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

Remove sleep when waiting for node close #1722

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

peternied
Copy link
Member

@peternied peternied commented Mar 31, 2022

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 testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

peternied and others added 2 commits March 30, 2022 20:05
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]>
@peternied peternied self-assigned this Mar 31, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2022

Codecov Report

Merging #1722 (b884e22) into main (978c71a) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            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     
Impacted Files Coverage Δ
...ecurity/ssl/rest/SecuritySSLReloadCertsAction.java 85.10% <0.00%> (+0.32%) ⬆️
...iance/ComplianceIndexingOperationListenerImpl.java 62.31% <0.00%> (+1.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 978c71a...b884e22. Read the comment docs.

@peternied peternied added the enhancement New feature or request label Mar 31, 2022
@peternied peternied marked this pull request as ready for review March 31, 2022 11:41
@peternied peternied requested a review from a team March 31, 2022 11:41
@peternied
Copy link
Member Author

@cliu123 Could I get a review on this pull request?

@peternied
Copy link
Member Author

@opensearch-project/security Could I get a second review?

@cliu123
Copy link
Member

cliu123 commented Apr 6, 2022

@cliu123 Could I get a review on this pull request?

Sorry, I missed this message.

@cliu123
Copy link
Member

cliu123 commented Apr 6, 2022

LGTM!

@cliu123 cliu123 merged commit f2edade into opensearch-project:main Apr 6, 2022
@peternied peternied deleted the faster-node-close branch April 7, 2022 01:25
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants