-
Notifications
You must be signed in to change notification settings - Fork 282
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
Remove sleep when waiting for node close #1722
Conversation
For each node in the cluster we were removing and then sleeping for 250ms. There is an API that we can wait on to be sure the node has closed or at least take action if the closure wasn't successful. For the usage, which is cleaning up all nodes, switching to a best effort mode that could wait the same 250ms or return faster. Signed-off-by: Peter Nied <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1722 +/- ##
=========================================
Coverage 62.87% 62.87%
- Complexity 3264 3266 +2
=========================================
Files 253 253
Lines 18096 18097 +1
Branches 3246 3246
=========================================
+ Hits 11377 11379 +2
+ Misses 5064 5062 -2
- Partials 1655 1656 +1
Continue to review full report at Codecov.
|
@cliu123 Could I get a review on this pull request? |
@opensearch-project/security Could I get a second review? |
Sorry, I missed this message. |
LGTM! |
Signed-off-by: Peter Nied <[email protected]>
Description
For each node in the cluster we were removing and then sleeping for
250ms. There is an API that we can wait on to be sure the node has
closed or at least take action if the closure wasn't successful.
For the usage, which is cleaning up all nodes, switching to a best
effort mode that could wait the same 250ms or return faster.
Testing
Tested in this PR's workflow, new runtime is 25 minutes down from 40, a 40% reduction in runtime.Tested in this PR's workflow, new runtime is 25 minutes, seeing this amount of time hit during other runs. While it might not provide a giant boost, I still think its worthwhile to avoid unreasoned sleeps.
Check List
New functionality includes testingNew functionality has been documentedBy 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.