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

Speedup snapshot stale indices delete #613

Merged
merged 1 commit into from
Apr 27, 2021
Merged

Speedup snapshot stale indices delete #613

merged 1 commit into from
Apr 27, 2021

Conversation

piyushdaftary
Copy link
Contributor

Fix for issue: elastic/elasticsearch#61513

Description

Current implementation cleanupStaleIndices() of snapshot deletion is very slow . Snapshot deletion code deletes each stale indices from repository one after another sequentially .

With this code changes instead of making snapshot delete of stale indices a single threaded operation we make it multithreaded operation and delete multiple stale indices in parallel using SNAPSHOT thread pool's workers.

I have added more tests to make sure outage scenario and failover scenario is handled.

Issues Resolved

elastic/elasticsearch#64513

Check List

  • [ Y] New functionality includes testing.
    • [ Y] All tests pass
  • [Y] 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.

@odfe-release-bot
Copy link

❌   DCO Check Failed c3de5944883f79cd98fca7358bb43e7b30f7c083
Run ./dev-tools/signoff-check.sh remotes/origin/main c3de5944883f79cd98fca7358bb43e7b30f7c083 to check locally
Use git commit with -s to add 'Signed-of-by: {EMAIL}' on impacted commits

@odfe-release-bot
Copy link

✅   Gradle Wrapper Validation success c3de5944883f79cd98fca7358bb43e7b30f7c083

@odfe-release-bot
Copy link

✅   Gradle Precommit success c3de5944883f79cd98fca7358bb43e7b30f7c083

Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

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

can you amend the commit message to add sign-off for DCO? git commit --amend -s

@odfe-release-bot
Copy link

✅   DCO Check Passed edc4db1

@odfe-release-bot
Copy link

✅   Gradle Wrapper Validation success edc4db1

@odfe-release-bot
Copy link

✅   Gradle Precommit success edc4db1

@nknize
Copy link
Collaborator

nknize commented Apr 26, 2021

start gradle check

@odfe-release-bot
Copy link

✅   Gradle Check success edc4db1
Log 141

Reports 141

Copy link
Collaborator

@nknize nknize left a comment

Choose a reason for hiding this comment

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

LGTM!

@nknize nknize added enhancement Enhancement or improvement to existing feature or request v1.0.0 Version 1.0.0 v2.0.0 Version 2.0.0 labels Apr 27, 2021
@nknize nknize merged commit 7ccb714 into opensearch-project:main Apr 27, 2021
@nknize nknize added the pending backport Identifies an issue or PR that still needs to be backported label Apr 27, 2021
@nknize
Copy link
Collaborator

nknize commented Apr 27, 2021

Merged.. Thank you @piyushdaftary /cc @AmiStrn

nknize pushed a commit to nknize/OpenSearch that referenced this pull request Apr 27, 2021
Instead of snapshot delete of stale indices being a single threaded operation this commit makes 
it a multithreaded operation and delete multiple stale indices in parallel using SNAPSHOT 
threadpool's workers.

Signed-off-by: Piyush Daftary <[email protected]>
nknize added a commit that referenced this pull request Apr 28, 2021
Instead of snapshot delete of stale indices being a single threaded operation this commit makes 
it a multithreaded operation and delete multiple stale indices in parallel using SNAPSHOT 
threadpool's workers.

Signed-off-by: Piyush Daftary <[email protected]>
@nknize nknize removed the pending backport Identifies an issue or PR that still needs to be backported label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request v1.0.0 Version 1.0.0 v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants