[NETCONF-1148] Clean up NetconfDeviceTopologyAdapter datastore lifecycle Created: 05/Sep/23 Updated: 06/Sep/23 Resolved: 06/Sep/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf-topology |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0, 6.0.3 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
NetconfDeviceTopologyAdapter is using 'mergeParentStructure' operations to ensure the underlying topology is already present in the datastore. This is wasteful, as this is an invariant that the callers should be taking care of before instantiating the adapter. Furthermore, the adapter performs writes and merges which seem to be overlapping, perhaps introducing state without regard of what has been done previously. We should optimize this by changing only what needs to be changed w.r.t. baseline. |
| Comments |
| Comment by Robert Varga [ 06/Sep/23 ] |
|
The second part is not really feasible, as we end up manipulating multiple leaves and bigger structures. A simple put() is the simplest solution. |