[ 
https://issues.apache.org/jira/browse/OAK-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Sedding updated OAK-2586:
--------------------------------
    Attachment: OAK-2586.patch

Replaced old patch with a more complete version (patch from OAK-2619 is a 
prerequisite).

The patch introduces a {{FilteringNodeState}} decorator, that handles NodeStore 
visibility based on a set of include-paths and exclude-paths. Decoration of 
children is only done when required (i.e. when an include or exclude affects 
visibility in a given sub-tree). Otherwise the children of the decorated 
NodeState are directly returned, thus limiting any overhead.

The {{NodeSateCopier}} class added in OAK-2619 is extended to support includes 
and excludes during copies via {{FilteringNodeState}}.

By default {{NodeSateCopier}} will re-create the state from the source 
{{NodeState}}  on a target {{NodeBuilder}}. This means that nodes in the target 
will be removed if they are missing in the source.

Sometimes, it is desirable to keep these nodes in the target, however. To 
support this use-case the {{NodeSateCopier}} introduces the concept of 
merge-paths. These paths define sub-trees, where no nodes are removed in the 
target.

> Support including and excluding paths during upgrade
> ----------------------------------------------------
>
>                 Key: OAK-2586
>                 URL: https://issues.apache.org/jira/browse/OAK-2586
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: upgrade
>    Affects Versions: 1.1.6
>            Reporter: Julian Sedding
>              Labels: patch
>         Attachments: OAK-2586.patch
>
>
> When upgrading a Jackrabbit 2 to an Oak repository it can be desirable to 
> constrain which paths/sub-trees should be copied from the source repository. 
> Not least because this can (drastically) reduce the amount of content that 
> needs to be traversed, copied and indexed.
> I suggest to allow filtering the content visible from the source repository 
> by wrapping the JackrabbitNodeState instance and hiding selected paths.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to