[warm restart assist] assume vector values could be reordered#921
[warm restart assist] assume vector values could be reordered#921yxieca merged 1 commit intosonic-net:masterfrom
Conversation
When comparing 2 vectors, assume their elements could be re-ordered. Signed-off-by: Ying Xie <[email protected]>
|
I would recommend switching to producerstatetabe view comparison mechanism as that being used in teamsyncd. It helps to reduce the maintenance effort, also producerstatetabe view comparison mechanism is more flexible. |
|
@jipanyang can you point me to an example? I need to get the problem under control first. Can we move on then improve? |
|
@jipanyang I found the code you are talking about. This code is not generic, it is written for team management only. There needs to have some refactoring and abstracting before it can be generally in other cases. Right? And the comparison is similar to what I added here too. |
When comparing 2 vectors, assume their elements could be re-ordered. Signed-off-by: Ying Xie <[email protected]>
View switch design and implementation: Usage example: We found view switch mechanism is able to handle FV vectors with non-ordered and variable number of fields. |
…net#921) When comparing 2 vectors, assume their elements could be re-ordered. Signed-off-by: Ying Xie <[email protected]>
What I did
When comparing 2 vectors, assume their elements could be re-ordered.
Signed-off-by: Ying Xie [email protected]
Why I did it
Without he change, during warm reboot, some neighbor entries will be mistakenly judged as having new value and recreated.
How I verified it
With the change, no neighbor entry got recreated due to having 'new value' after warm reboot.