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

Improve InMemoryDataTreeModification state management


    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 11.0.3
    • None
    • data-impl

      We are currently tracking only a single boolean state. A typical modification goes through multiple state transitions. For example ready() changes first from OPEN to SEALING and once the seal operation is done it goes to SEALED. DataTreeTip.validate() then expects not only a non-OPEN (for example SEALING) modification, but rather a SEALED one.

      The distinction guides state transitions with the explicit acknowledgement that operations may fail, which may require a corrective action, or, as in the case of ready() epilogue throwing a RuntimeException, result in an irrecoverable dead-end. Such dead-ends should be refused to be operated on.

            rovarga Robert Varga
            rovarga Robert Varga
            0 Vote for this issue
            1 Start watching this issue