[Bug] Fix race condition in interface model cancel thread#3508
Open
ryan-pratt wants to merge 5 commits into
Open
[Bug] Fix race condition in interface model cancel thread#3508ryan-pratt wants to merge 5 commits into
ryan-pratt wants to merge 5 commits into
Conversation
| Logger.error("Error undeploying interface/router model #{@name} in scope #{@scope} due to #{error}") | ||
| ensure | ||
| begin | ||
| if type == 'INTERFACE' |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3508 +/- ##
=======================================
Coverage 79.28% 79.28%
=======================================
Files 689 689
Lines 57332 57338 +6
Branches 728 728
=======================================
+ Hits 45455 45462 +7
+ Misses 11799 11798 -1
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eb4b86a to
3f11a94
Compare
|
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.



When uninstalling a plugin, there was a race condition where
InterfaceStatusModel.set()orRouterStatusModel.set()could be called during the last loop iteration, immediately after a different thread removed them. This resulted in orphaned data in valkey.There was also an issue in interface_model.rb where we never called
.destroy()on the model if we encountered an exception earlier in the block.