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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2018/11/20 10:50:00 UTC

[jira] [Commented] (OAK-7910) Node type validation of a hidden node

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

Thomas Mueller commented on OAK-7910:
-------------------------------------

Possible patch:

{noformat}
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java	(revision 1841469)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java	(working copy)
@@ -475,6 +475,9 @@
         }
         if (!names.isEmpty()) {
             for (String name : names) {
+                if (NodeStateUtils.isHidden(name)) {
+                    continue;
+                }
                 NodeState child = after.getChildNode(name);
                 String primary = child.getName(JCR_PRIMARYTYPE);
                 Iterable<String> mixins = child.getNames(JCR_MIXINTYPES);
{noformat}


> Node type validation of a hidden node
> -------------------------------------
>
>                 Key: OAK-7910
>                 URL: https://issues.apache.org/jira/browse/OAK-7910
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>
> With the composite node store, creating a Lucene index in the read-write repository fails due to the exception below. I think Oak shouldn't try to do node type validation for hidden nodes.
> {noformat}
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001: /oak:index/test/:oak:mount-libs-index-data[[]]: The primary type null does not exist
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor$1.onConstraintViolation(TypeEditor.java:109) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.constraintViolation(TypeEditor.java:234) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.createEffectiveType(TypeEditor.java:337) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.<init>(TypeEditor.java:203) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.checkNodeTypeConstraints(TypeEditor.java:482) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.enter(TypeEditor.java:276) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:53) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.enter(CompositeEditor.java:65) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:121) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeAdded(CompositeNodeState.java:304) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeAdded(CompositeNodeState.java:247) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889]
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001: /oak:index/test/:oak:mount-libs-index-data[[]]: The primary type null does not exist
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor$1.onConstraintViolation(TypeEditor.java:109) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.constraintViolation(TypeEditor.java:234) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.createEffectiveType(TypeEditor.java:337) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.<init>(TypeEditor.java:203) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.checkNodeTypeConstraints(TypeEditor.java:482) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.plugins.nodetype.TypeEditor.enter(TypeEditor.java:276) [org.apache.jackrabbit.oak-core:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:53) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.enter(CompositeEditor.java:65) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:121) [org.apache.jackrabbit.oak-store-spi:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeAdded(CompositeNodeState.java:304) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeAdded(CompositeNodeState.java:247) [org.apache.jackrabbit.oak-store-composite:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.segment.MapRecord$4.childNodeAdded(MapRecord.java:443) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:505) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:440) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889]
> 	at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:651) [org.apache.jackrabbit.oak-segment-tar:1.9.10.R1845889]
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)