Skip to content

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

Merged
dnhatn merged 2 commits intoelastic:peer-recovery-retention-leasesfrom
dnhatn:do-not-load-gcp
Jul 24, 2019
Merged

Do not load global checkpoint to ReplicationTracker in local recovery step#44781
dnhatn merged 2 commits intoelastic:peer-recovery-retention-leasesfrom
dnhatn:do-not-load-gcp

Conversation

@dnhatn
Copy link
Copy Markdown
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/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
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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/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