Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-500

DataTree: write/write/merge combo may lose data

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 4288

    Description

      Code review of OperationWithModification.recursiveMerge() will propagate the pre-existing WRITE node's children downwards to preserve the data items which were written.

      This unfortunately fails to check if there are nested nodes (introduced after the write which is being replaced), thus losing them.

      The specific problem comes from the following set of operations being done on a DataTreeModification:

      write(A, data1);
      write(A/B, data2);
      merge(A, data3);

      if data1 overlaps with data2, the merge to A will push data1's version of data2 into A/B, hence the result will look as if the second write never happened.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: