Skip to content

Implement proper handoff between primary copies during relocation#15532

Closed
areek wants to merge 1 commit intoelastic:masterfrom
areek:wait_for_pending_ops
Closed

Implement proper handoff between primary copies during relocation#15532
areek wants to merge 1 commit intoelastic:masterfrom
areek:wait_for_pending_ops

Conversation

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