Improve route_check to better handle duplicate updates#2884
Closed
lolyu wants to merge 1 commit intosonic-net:masterfrom
Closed
Improve route_check to better handle duplicate updates#2884lolyu wants to merge 1 commit intosonic-net:masterfrom
route_check to better handle duplicate updates#2884lolyu wants to merge 1 commit intosonic-net:masterfrom
Conversation
Reason for this PR is that there could be multiple route set updates from ASIC_DB when the mux toggles to standby. This PR aims to improve `route_check` to handle this situation. Few updates: 1. Replace `diff_sorted_lists` with `diff_lists`, which is better in handling duplicate entries and it is faster. 2. Remove redundant sort. 3. Add UT to cover duplicate updates. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
yxieca
approved these changes
Jun 22, 2023
Contributor
|
This seems to be a major change to existing script. Need to understand the motivation of this change as we use this script for many different validations? My point is, if its mux related, then handle that specifically instead of a generic change |
Contributor
Author
Hi @prsunny, this PR doesn't add the mux validation, This PR aims to improve this script to better handle the duplicated updates and add a UT to validate the duplicated updates scenario. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Reason for this PR is that there could be multiple route set updates from ASIC_DB when the mux toggles to standby. This PR aims to improve
route_checkto handle this situation.Signed-off-by: Longxiang Lyu lolv@microsoft.com
How I did it
Few updates:
diff_sorted_listswithdiff_lists, which is better in handling duplicate entries and executed faster.How to verify it
UT and verify on dualtor environment
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)