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

Add option to track InMemoryDataTree modification metadata

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 14.0.0
    • None
    • data-impl
    • None

      RESTCONF suggests implementations should track Last-Modified and ETag headers for every resource.

      InMemoryDataTree is our reference implementation underlying DOMDataStore, which is what RESTCONF talks to. Unfortunately it lacks the ability to track metadata about modifications.

      What we would really like is to track:

      1. ETag as an UUID, which provides reasonable odds against collisions at the cost of 128bits (16 bytes)
      2. Last-Modified as an Instant, which is the most accurate point in time representation, costing 96 bites (12 bytes)

      It is not feasible to tract these two as separate objects, due to object header overheads (which are comparable to each object's significant content. We therefore should have an interface hierarchy combining supporting the 4 combinations which can result in terms of support, Worst case scenario devolves to

      record LastModifiedETag(
        long instantSeconds,
        int instantNanos,
        long uuidLow,
        long uuidHigh) {
      }
      

      Furthermore we should not track this for every data tree node, but rather provide a way to look up LastModifiedETag from a commited Version object. Since each node has a Version, that should work out just fine.

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

              Created:
              Updated: