-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix potential concurrent modification exception in DiscoveryNodeFilters #19701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix potential concurrent modification exception in DiscoveryNodeFilters #19701
Conversation
b885744 to
fac3725
Compare
|
❌ Gradle check result for fac3725: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
❌ Gradle check result for fac3725: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for fac3725: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for fac3725: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
fac3725 to
979a496
Compare
|
❌ Gradle check result for 979a496: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 979a496: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
979a496 to
016aaa3
Compare
|
❌ Gradle check result for 016aaa3: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
While I haven't seen concurrency issues in DiscoveryNodeFilters, the included unit test (which fails without cloning the original filters) shows that there is potential for an exception. While in here, I also made some reads from volatile variables in FilterAllocationDecider more atomic to avoid potential null-pointer exceptions. Signed-off-by: Michael Froh <[email protected]>
016aaa3 to
374fe57
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19701 +/- ##
============================================
- Coverage 73.11% 73.00% -0.11%
+ Complexity 70823 70715 -108
============================================
Files 5732 5732
Lines 324255 324258 +3
Branches 46924 46925 +1
============================================
- Hits 237087 236733 -354
- Misses 68076 68415 +339
- Partials 19092 19110 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
While I haven't seen concurrency issues in DiscoveryNodeFilters, the included unit test (which fails without cloning the original filters) shows that there is potential for an exception.
While in here, I also made some reads from volatile variables in FilterAllocationDecider more atomic to avoid potential null-pointer exceptions.
Related Issues
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.