Purge remote translog basis the latest metadata for remote-backed indexes#6086
Merged
gbbafna merged 16 commits intoopensearch-project:mainfrom Feb 3, 2023
Merged
Conversation
6 tasks
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
9d30ec8 to
b5c0f7f
Compare
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
Gradle Check (Jenkins) Run Completed with:
|
gbbafna
reviewed
Feb 2, 2023
server/src/main/java/org/opensearch/index/translog/RemoteFsTranslog.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ashish Singh <ssashish@amazon.com>
gbbafna
approved these changes
Feb 2, 2023
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Contributor
|
Build failed due to |
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Member
Author
|
Build succeeded. @gbbafna |
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Feb 3, 2023
…exes (#6086) * Deleting remote translog considering latest remote metadata Co-authored-by: Gaurav Bafna <gbbafna@amazon.com> Signed-off-by: Ashish Singh <ssashish@amazon.com> (cherry picked from commit 54ce423) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 tasks
ashking94
pushed a commit
to ashking94/OpenSearch
that referenced
this pull request
Feb 6, 2023
…exes (opensearch-project#6086) * Deleting remote translog considering latest remote metadata Co-authored-by: Gaurav Bafna <gbbafna@amazon.com> Signed-off-by: Ashish Singh <ssashish@amazon.com> (cherry picked from commit 54ce423) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During failover or relocation of primary shard, during initialisation of RemoteFsTranslog, we read remote translog metadata and download translog and checkpoint file for the corresponding primary term and generation as present in remote translog metadata file. After a flush, we clear *.tlog and *.ckp files, but the remote metadata file continues to hold references to the deleted generations. We need to handle the same.
We should delete remote translog considering the latest metadata file uploaded. The tlog/ckp files referenced by that metadata file should not be deleted . By doing this we will be able to restore translog from that metadata.
Issues Resolved
#5845
Check List
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.