Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4153

segment's compareAgainstBaseState wont call childNodeDeleted when deleting last and adding n nodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0.29, 1.2.13, 1.4.1, 1.5.0
    • 1.0.34, 1.2.19, 1.4.7, 1.5.1, 1.6.0
    • segmentmk
    • None

    Description

      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 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.

      Attachments

        1. OAK-4153.patch
          3 kB
          Stefan Egli
        2. OAK-4153.simplified.patch
          1 kB
          Stefan Egli
        3. OAK-4153-2.patch
          2 kB
          Michael Dürig
        4. OAK-4153-3.patch
          2 kB
          Stefan Egli

        Activity

          People

            stefanegli Stefan Egli
            stefanegli Stefan Egli
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: