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

Stefan Egli resolved OAK-4153.
------------------------------
    Resolution: Fixed

> segment's compareAgainstBaseState wont call childNodeDeleted when deleting 
> last 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.2.13, 1.0.29, 1.4.1, 1.5.0
>            Reporter: Stefan Egli
>            Assignee: Stefan Egli
>            Priority: Critical
>             Fix For: 1.4.7, 1.2.19, 1.0.34, 1.5.1
>
>         Attachments: OAK-4153-2.patch, OAK-4153-3.patch, OAK-4153.patch, 
> OAK-4153.simplified.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)

Reply via email to