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

Keep a shadow replicas' allocation id when it is promoted to primary #20863

Merged
merged 2 commits into from Oct 11, 2016

Conversation

Projects
None yet
4 participants
@bleskes
Copy link
Member

commented Oct 11, 2016

Shadow replicas can not be simply promoted to primary by updating boolean like normal shards. Instead the are reinitialized and shut down and rebuilt as primaries. Currently we also given them new allocation ids but that throws off the in-sync allocation ids management. This commit changes this behavior to keep the allocation id of the shard.

Closes #20650

Keep a shadow replica's allocation id when it is promoted to primary
Shadow replicas can not be simply promoted to primary by updating boolean like normal shards. Instead the are reinitialized and shut down and rebuilt as primaries. Currently we also given them new allocation ids but that throws off the in-sync allocation ids management. This commit changes this behavior to keep the allocation id of the shard.

Closes #20650
@bleskes

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2016

@ywelsch can you please take a look? you know that code best :)

@ywelsch
Copy link
Contributor

left a comment

LGTM (left one minor code comment)

@@ -95,7 +95,6 @@ public void relocationCompleted(ShardRouting removedRelocationSource) {

@Override
public void startedPrimaryReinitialized(ShardRouting startedPrimaryShard, ShardRouting initializedShard) {

This comment has been minimized.

Copy link
@ywelsch

ywelsch Oct 11, 2016

Contributor

can you remove this method override here? No need to override empty method with empty method.

This comment has been minimized.

Copy link
@bleskes

bleskes Oct 11, 2016

Author Member

removed. I thought this was implementing an interface.

@bleskes bleskes merged commit c6e1ef5 into elastic:master Oct 11, 2016

1 of 2 checks passed

elasticsearch-ci Build started sha1 is merged.
Details
CLA Commit author is a member of Elasticsearch
Details

@bleskes bleskes deleted the bleskes:shadow_replica_reuse_aid branch Oct 11, 2016

bleskes added a commit that referenced this pull request Oct 11, 2016

Keep a shadow replicas' allocation id when it is promoted to primary (#…
…20863)

Shadow replicas can not be simply promoted to primary by updating boolean like normal shards. Instead the are reinitialized and shut down and rebuilt as primaries. Currently we also given them new allocation ids but that throws off the in-sync allocation ids management. This commit changes this behavior to keep the allocation id of the shard.

Closes #20650

bleskes added a commit that referenced this pull request Oct 11, 2016

Keep a shadow replicas' allocation id when it is promoted to primary (#…
…20863)

Shadow replicas can not be simply promoted to primary by updating boolean like normal shards. Instead the are reinitialized and shut down and rebuilt as primaries. Currently we also given them new allocation ids but that throws off the in-sync allocation ids management. This commit changes this behavior to keep the allocation id of the shard.

Closes #20650
@bleskes

This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2016

thx @ywelsch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.