Test Case for Race Condition in Config Notifier#1018
Merged
tcormackMW merged 7 commits intodevelopmentfrom Jul 2, 2024
Merged
Conversation
jeffdiclemente
approved these changes
Jul 1, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## development #1018 +/- ##
===============================================
+ Coverage 88.48% 88.50% +0.01%
===============================================
Files 242 242
Lines 11880 11880
===============================================
+ Hits 10512 10514 +2
+ Misses 1368 1366 -2 |
carneyweb
approved these changes
Jul 2, 2024
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.
This test case does expose the bug fixed in #1016 for the ConfigNotifier. Essentially if we have a race between unregistering a listener for a config and then notifying of a config change, it can get past the
AnyListenersForPidcall made inConfigurationListenerImpl::ConfigurationEventand intoNotifyAllListenerswith an empty map. All this means is that the check, already implemented in #1016, needs to done.Of note, this is a very sporadic occurence even in this test case, on the order of 1/500 runs. I am not sure how common this is in real life examples, I have seen it on a much more common level i.e. 1/3 runs in the wild.