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

Cancel replica recovery on another sync option copy found #12421

Merged

Conversation

kimchy
Copy link
Member

@kimchy kimchy commented Jul 23, 2015

When a replica is initializing from the primary, and we find a better node that has full sync id match, it is better to cancel the existing replica allocation and allocate it to the new node with sync id match (eventually)

/**
* A better replica location is identified and causes the existing replica allocation to be cancelled.
*/
REALOCATED_REPLICA;
Copy link
Contributor

Choose a reason for hiding this comment

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

we miss an L here REAL_L_OCATED

Copy link
Member Author

Choose a reason for hiding this comment

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

:)

@bleskes
Copy link
Contributor

bleskes commented Jul 23, 2015

This is awesome. LGTM. Left some small suggestions...

@bleskes
Copy link
Contributor

bleskes commented Jul 23, 2015

OH. We probably need to document this. I'm also wondering if a release highlight is in order...

@kimchy
Copy link
Member Author

kimchy commented Jul 23, 2015

@bleskes pushed changes, @clintongormley I am not sure where to document this?

@bleskes
Copy link
Contributor

bleskes commented Jul 23, 2015

still awesome

@pickypg
Copy link
Member

pickypg commented Jul 23, 2015

This is awesome and it's definitely a worthwhile release highlight!

@clintongormley
Copy link

@kimchy should be documented here i think: https://www.elastic.co/guide/en/elasticsearch/reference/master/delayed-allocation.html

I can add a note if you like. What do you mean by (eventually) in your PR description?

When a replica is initializing from the primary, and we find a better node that has full sync id match, it is better to cancel the existing replica allocation and allocate it to the new node with sync id match (eventually)
@kimchy kimchy force-pushed the cancel_replica_allocation_on_better_match branch from 2bfe004 to fc90c2a Compare July 24, 2015 10:13
@kimchy kimchy merged commit fc90c2a into elastic:master Jul 24, 2015
@kimchy
Copy link
Member Author

kimchy commented Jul 24, 2015

thanks @clintongormley!, I just pushed it. What I meant by eventually is that we cancel the replica allocation to the node, and then we will try and allocate it to the node with the sync id match, but on that node, we might be throttling allocation, so it will end up getting assigned to it, but not right away, in order to respect the allocation deciders.

@kimchy kimchy deleted the cancel_replica_allocation_on_better_match branch July 24, 2015 10:14
clintongormley added a commit that referenced this pull request Aug 7, 2015
@clintongormley
Copy link

Docs added in c22e179

@lcawl lcawl added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. and removed :Allocation labels Feb 13, 2018
@clintongormley clintongormley added :Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) and removed :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >feature release highlight v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants