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

Implement proper handoff between primary copies during relocation #15532

Closed
wants to merge 1 commit into from

Conversation

areek
Copy link
Contributor

@areek areek commented Dec 18, 2015

This implements a clean handoff between shard copies during primary relocation.
After replaying the translog to target copy during relocation, the source copy is
marked as relocated. Further writes are blocked on relocated shard copies
and are retried until relocation completes (waits for the cluster state to point to
the new copy).
The recovery process blocks until all pending writes complete on the source copy.
In case of failure/cancellation of recoveries after the source copy has been marked
as relocated, the source state is marked back to started and resumes to accept
writes.

relates #8706

@areek areek added >enhancement review resiliency :Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. v5.0.0-alpha1 labels Dec 18, 2015
@areek areek force-pushed the wait_for_pending_ops branch 2 times, most recently from 11d4202 to 6ac9b7a Compare December 30, 2015 20:01
Now we mark the source copy as relocated after replaying the translog
to target during relocation, blocking till all pending operations complete.
Any further write operations are blocked on relocated shard copies, they are
retried when relocation has completed
@areek areek force-pushed the wait_for_pending_ops branch from 6ac9b7a to 3252035 Compare December 30, 2015 20:06
@areek
Copy link
Contributor Author

areek commented Jan 2, 2016

@bleskes I have simplified this PR based on our discussion. Updated the description with the implemented approach.

@clintongormley
Copy link
Contributor

Closed in favour of #15900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Recovery Anything around constructing a new shard, either from a local or a remote source. >enhancement resiliency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants