You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Sedding (JIRA)" <ji...@apache.org> on 2015/04/01 14:06:53 UTC

[jira] [Comment Edited] (OAK-2586) Support including and excluding paths during upgrade

    [ https://issues.apache.org/jira/browse/OAK-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14390456#comment-14390456 ] 

Julian Sedding edited comment on OAK-2586 at 4/1/15 12:05 PM:
--------------------------------------------------------------

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.

For the changes in context, see https://github.com/apache/jackrabbit-oak/compare/trunk...code-distillery:trunk


was (Author: jsedding):
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)