[
https://issues.apache.org/jira/browse/OAK-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
angela updated OAK-3541:
------------------------
Attachment: OAK-3541.patch
the attached patch solves the OPV-IGNORE issue for me. however, since i am not
too familiar with the other OPV-flags i don't know if it works properly for
nodes with OPV-VERSION in the subtree.
one more thing: the original code used {{OPVForceCopy}} for all properties in
the subtree. calling the {{createFrozenNode}} again for the subtree nodes (as
proposed by the patch) changes this to use the anonymous inner implementation
instead, which looks as follows:
{code}
new OPVProvider() {
@Override
public int getAction(NodeBuilder src,
NodeBuilder dest,
PropertyState prop)
throws RepositoryException {
String propName = prop.getName();
if (BASIC_FROZEN_PROPERTIES.contains(propName)) {
// OAK-940: do not overwrite basic frozen properties
return IGNORE;
} else if (isHiddenProperty(propName)) {
// don't copy hidden properties except for :childOrder
return IGNORE;
}
return getOPV(src, prop);
}
}
{code}
In general that looks better to me, but this definitely needs a second look as
well as some test-coverage, verifying that this is really correct.
[~mreutegg], wdyt?
> VersionableState.copy doesn't respect OPV flag in the subtree
> -------------------------------------------------------------
>
> Key: OAK-3541
> URL: https://issues.apache.org/jira/browse/OAK-3541
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: angela
> Priority: Critical
> Attachments: OAK-3541.patch, OAK-3541_test.patch
>
>
> while testing my work in OAK-1268 and OAK-2008, i found that items with OPV
> IGNORE are being copied into the frozen node of a versionable node upon
> checkin and only the first level child nodes are being tested for the OPV
> flag.
> IMHO the OPV flag should be respected for all items in the subtree and act
> accordingly. The current bug might prevent versionable child nodes from being
> properly versioned and will copy items that are expected to be ignored (e.g.
> access control content) into the version store.
> if i am not mistaken the properties are actually tested for the their OPV
> flag... if that is true, we might even have a bigger issue as the content in
> the version store is no longer complete and valid (e.g.
> mandatory/protected/autocreated properties being ignored but the node still
> being copied over and thus being invalid)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)