[YANGTOOLS-1554] Add option to track InMemoryDataTree modification metadata Created: 07/Dec/23 Updated: 05/Jan/24 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | data-impl |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0 |
| Type: | New Feature | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
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:
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. |