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

Do not load global checkpoint to ReplicationTracker in local recovery step #44781

Merged
merged 2 commits into from
Jul 24, 2019

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Jul 24, 2019

If we force allocate an empty or stale primary, the global checkpoint on replicas might be higher than the primary's as the local recovery step (introduced in #43463) loads the previous (stale) global checkpoint into ReplicationTracker. There's no issue with the retention leases for a new lease with a higher term will supersede the stale one.

Relates #43463

@dnhatn dnhatn added >bug :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. labels Jul 24, 2019
@dnhatn dnhatn requested a review from ywelsch July 24, 2019 01:30
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

I wondered if it would be simpler to reset the global checkpoint in the tracker at the end of recoverLocallyUpToGlobalCheckpoint. I'm leaving it up to you to decide.

@dnhatn
Copy link
Member Author

dnhatn commented Jul 24, 2019

I wondered if it would be simpler to reset the global checkpoint in the tracker at the end of recoverLocallyUpToGlobalCheckpoint.

Yes, that would be simpler. I tried it but abandoned as we also need to reset the GlobalCheckpointListeners.

@dnhatn
Copy link
Member Author

dnhatn commented Jul 24, 2019

Thanks @ywelsch.

@dnhatn dnhatn merged commit 6275cd7 into elastic:peer-recovery-retention-leases Jul 24, 2019
dnhatn added a commit that referenced this pull request Jul 24, 2019
… step (#44781)

If we force allocate an empty or stale primary, the global checkpoint on
replicas might be higher than the primary's as the local recovery step
(introduced in #43463) loads the previous (stale) global checkpoint into
ReplicationTracker. There's no issue with the retention leases for a new
lease with a higher term will supersede the stale one.

Relates #43463
@dnhatn dnhatn deleted the do-not-load-gcp branch August 1, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants