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

Logic for writing properties in SegmentWriter.writeNode looks off

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.9, 1.1.4
    • segmentmk
    • None

    Description

      As mentioned by alex.parvulescu, the condition at line 1096 of SegmentWriter looks off:

      } else if (!(before instanceof SegmentNodeState) || store.containsSegment(before.getRecordId().getSegmentId())) {
      

      In fact it looks like a refactoring accident introduced with OAK-631

      - || ((SegmentNodeState) before).getStore() != store) {
      + || store.containsSegment(((SegmentNodeState)before)
              .getRecordId().getSegmentId())) {
      

      where the negation has just been forgotten. See https://github.com/apache/jackrabbit-oak/commit/d96eb8c3ea8738695780b6a03c4902f0ce1f337f#diff-cd2b669b9d707784b58ff1783748f932

      Attachments

        Activity

          People

            mduerig Michael Dürig
            mduerig Michael Dürig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: