Skip to content

Conversation

@msfroh
Copy link
Contributor

@msfroh msfroh commented Oct 21, 2025

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

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@msfroh msfroh force-pushed the fix_concurrent_modification_in_DiscoveryNodeFilters branch from b885744 to fac3725 Compare October 21, 2025 00:15
@msfroh msfroh marked this pull request as ready for review October 21, 2025 00:18
@msfroh msfroh requested a review from a team as a code owner October 21, 2025 00:18
@github-actions
Copy link
Contributor

❌ 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?

Copy link
Contributor

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions
Copy link
Contributor

❌ 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?

@github-actions
Copy link
Contributor

❌ 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?

@github-actions
Copy link
Contributor

❌ 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?

@msfroh msfroh force-pushed the fix_concurrent_modification_in_DiscoveryNodeFilters branch from fac3725 to 979a496 Compare October 21, 2025 17:07
@github-actions
Copy link
Contributor

❌ 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?

@github-actions
Copy link
Contributor

❌ 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?

@msfroh msfroh force-pushed the fix_concurrent_modification_in_DiscoveryNodeFilters branch from 979a496 to 016aaa3 Compare October 21, 2025 20:13
@github-actions
Copy link
Contributor

❌ 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]>
@github-actions
Copy link
Contributor

✅ Gradle check result for 374fe57: SUCCESS

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.00%. Comparing base (8feb6e1) to head (374fe57).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@msfroh msfroh merged commit c6236c3 into opensearch-project:main Oct 22, 2025
33 checks passed
@msfroh msfroh deleted the fix_concurrent_modification_in_DiscoveryNodeFilters branch October 22, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants