You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue may be specific to the clixon controller where the synch of multiple datastores is made, but may also appear in other circumstances, such as a local ACL list.
Consider a YANG ordered-by user list, eg:
list xlist {
key x;
leaf x { type string; }
ordered-by user;
}
The problem occurs if you do iterative changes to this list, eg:
add <x>2</x>
add <x>1</x>
Suppose in the second case that you enter <x>1</x> first in the list, either using "insert before" or by rewriting the whole list, resulting in a candidate datastore:
<x>1</x>
<x>2</x>
Then the clixon diff algorithm (show diff) will show:
+ <x>1</x>
A backend may then send this new entry to a target (eg device driver/ remote device or some other system) to add/append to the list of existing entries, resulting in a list:
<x>2</x>
<x>1</x> <--- New entry
But there has also been a reorder, what actually happened is that the entry was not only added but also inserted before the existing entry.
Therefore, a correct action of the diff algorithm would be to detect out-of-order elements. Or to replace the whole list with the new element order.
This issue may be specific to the clixon controller where the synch of multiple datastores is made, but may also appear in other circumstances, such as a local ACL list.
Consider a YANG ordered-by user list, eg:
The problem occurs if you do iterative changes to this list, eg:
<x>2</x>
<x>1</x>
Suppose in the second case that you enter
<x>1</x>
first in the list, either using "insert before" or by rewriting the whole list, resulting in a candidate datastore:Then the clixon diff algorithm (show diff) will show:
A backend may then send this new entry to a target (eg device driver/ remote device or some other system) to add/append to the list of existing entries, resulting in a list:
But there has also been a reorder, what actually happened is that the entry was not only added but also inserted before the existing entry.
Therefore, a correct action of the diff algorithm would be to detect out-of-order elements. Or to replace the whole list with the new element order.
A sub-part of this problem was fixed in:
#475
The text was updated successfully, but these errors were encountered: