Skip to content
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

Release latch listeners in case of no-op RoutingTableService #15614

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shiv0408
Copy link
Member

@shiv0408 shiv0408 commented Sep 3, 2024

Description

We are currently blocking the latched listeners in case of NoopRemoteRoutingTableService read and write actions. In case of publication is being disabled or enabled by rolling restart. Some nodes will be running on Noop service but will timeout downloading the cluster state.

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.

Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Copy link
Contributor

github-actions bot commented Sep 3, 2024

❌ Gradle check result for cc815d4: 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

github-actions bot commented Sep 5, 2024

❌ Gradle check result for cc815d4: 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

github-actions bot commented Sep 5, 2024

❌ Gradle check result for b6fdbcc: 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

github-actions bot commented Sep 5, 2024

✅ Gradle check result for 81682d4: SUCCESS

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.87%. Comparing base (729e40d) to head (937e34f).
Report is 17 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #15614      +/-   ##
============================================
- Coverage     71.95%   71.87%   -0.09%     
+ Complexity    64192    64159      -33     
============================================
  Files          5270     5271       +1     
  Lines        300052   300170     +118     
  Branches      43368    43380      +12     
============================================
- Hits         215917   215740     -177     
- Misses        66442    66686     +244     
- Partials      17693    17744      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Bukhtawar
Bukhtawar previously approved these changes Sep 5, 2024
Copy link
Collaborator

@Bukhtawar Bukhtawar left a comment

Choose a reason for hiding this comment

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

You might need to add some tests

Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Copy link
Contributor

github-actions bot commented Sep 5, 2024

✅ Gradle check result for 937e34f: SUCCESS


public void testGetAsyncIndexRoutingWriteAction() throws InterruptedException {
CountDownLatch latch = new CountDownLatch(1);
TestCapturingListener<ClusterMetadataManifest.UploadedMetadata> capturingListener = new TestCapturingListener<>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of this you can pass a listener with onResponse/onFailure overridden to set an Atomic result. Then all you can do is check whether that result was set or not after await

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I added this Listener in #14394. Basically does the same thing by overriding the onResponse/onFailure, but it isn't atomic that shouldn't be issue for our usecase I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants