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

Handled recovery to start from lowest seqno in the translog based on retention lease #1217

Conversation

saikaranam-amazon
Copy link
Member

Description

if pruning is enabled,

Issues Resolved

#1100

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

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.

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 3a293c7d37e8d59e43d9381c8b3c6e1456713b70

@opensearch-ci-bot
Copy link
Collaborator

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

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 6c546a3

@opensearch-ci-bot
Copy link
Collaborator

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

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 3a293c7d37e8d59e43d9381c8b3c6e1456713b70

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 6c546a3

@saikaranam-amazon saikaranam-amazon marked this pull request as ready for review September 6, 2021 10:11
.mapToLong(RetentionLease::retainingSequenceNumber)
.min()
.orElse(Long.MAX_VALUE);
final long safeCommitSeqNo = Long.parseLong(safeCommitRef.getIndexCommit()
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand this right, tlog recovery is a mechanism to optimize serialization. Why would start sequence number change?

Copy link
Member Author

Choose a reason for hiding this comment

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

We want to have the same set of tlog ops from the primary shard onto the replica shard during the peer recovery. This ensures the ops are available in tlog as well in newly recovered shard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants