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

[Remote Store] Avoiding Translog Deletion in case of relocating shards. #9603

Closed
wants to merge 3 commits into from

Conversation

gbbafna
Copy link
Collaborator

@gbbafna gbbafna commented Aug 29, 2023

Description

In Primary to Primary relocation , there can be concurrent upload and download of translog.
While translog files are getting downloaded by new primary, it might hence be deleted by the relocating primary
Hence we need to avoid to deletion when shard is in RELOCATING state .

Related Issues

Resolves #9191

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Member

@ashking94 ashking94 left a comment

Choose a reason for hiding this comment

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

Looks good overall, lets add UTs/ITs. Thanks for the change.

Signed-off-by: Gaurav Bafna <[email protected]>
@gbbafna gbbafna requested a review from msfroh as a code owner August 29, 2023 13:05
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@gbbafna
Copy link
Collaborator Author

gbbafna commented Aug 30, 2023

Failure not related to this change : #9580

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.

What if relocation is stuck and not all readers are needed, would we end up retaining readers for long? I would model this as a retention lease instead, the interface looks generic and cleaner that way

*
* @opensearch.internal
*/
static public class IndexShardConfigSupplier {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The structure seems to be force-fitting this very specific use case. We should model it more generically

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog stalled Issues that have stalled
Projects
None yet
3 participants