[ https://issues.apache.org/jira/browse/OAK-4153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Egli updated OAK-4153: ----------------------------- Attachment: OAK-4153.patch Attached a [^OAK-4153.patch] which adds a testcase ({{CompareAgainstBaseStateTest.testChildNodeDeletedAndMultipleAdded}}) as well as a suggestion for a fix of {{SegmentNodeState.compareAgainstBaseState}}. > segment's compareAgainstBaseState wont call childNodeDeleted when deleting 1 > and adding n nodes > ----------------------------------------------------------------------------------------------- > > Key: OAK-4153 > URL: https://issues.apache.org/jira/browse/OAK-4153 > Project: Jackrabbit Oak > Issue Type: Bug > Components: segmentmk > Affects Versions: 1.5.0 > Reporter: Stefan Egli > Priority: Critical > Fix For: 1.6 > > Attachments: OAK-4153.patch > > > {{SegmentNodeState.compareAgainstBaseState}} fails to call > {{NodeStateDiff.childNodeDeleted}} when for the same parent the only child is > deleted and at the same time multiple new, different children are added. > Reason is that the [current > code|https://github.com/apache/jackrabbit-oak/blob/a9ce70b61567ffe27529dad8eb5d38ced77cf8ad/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeState.java#L558] > for '{{afterChildName == MANY_CHILD_NODES}}' *and* '{{beforeChildName == > ONE_CHILD_NODE}}' does not handle all cases: it assumes that 'after' contains > the 'before' child and doesn't handle the situation where the 'before' child > has gone. -- This message was sent by Atlassian JIRA (v6.3.4#6332)