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

Take relocating shard into consideration during awareness allocation #13512

Merged

Conversation

Projects
None yet
4 participants
@masaruh
Copy link
Contributor

masaruh commented Sep 11, 2015

Previous fix #12551 counted twice for relocating shard (source and target).
Fix it to consider only target node.

@bleskes

View changes

...in/java/org/elasticsearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java Outdated
shardPerAttribute.addTo(relocationNode.node().attributes().get(awarenessAttribute), 1);
} else if (assignedShard.started() || assignedShard.initializing()) {
if (assignedShard.started() || assignedShard.initializing()) {
// since this also counts relocation targets as well, relocation source should not be counted as it is moving away.

This comment has been minimized.

Copy link
@bleskes

bleskes Sep 11, 2015

Member

Maybe "Note: this also counts relocation targets as that will be the new location of the shard. Relocation sources should not be counted as the shard is moving away"

This comment has been minimized.

Copy link
@masaruh

masaruh Sep 11, 2015

Author Contributor

That's better.

@bleskes

This comment has been minimized.

Copy link
Member

bleskes commented Sep 11, 2015

LGTM. thanks @masaruh . Can you label the PR? (and push it it all the same branches)

Take relocating shard into consideration during awareness allocation
Previous fix #12551 counted twice for relocating shard (source and target).
Fix it to consider only target node.

@masaruh masaruh force-pushed the masaruh:fix_awareness_allocation_for_relocating_node branch to 6a9ef99 Sep 11, 2015

@masaruh masaruh merged commit 6a9ef99 into elastic:master Sep 11, 2015

1 check passed

CLA Commit author is a member of Elasticsearch
Details
@masaruh

This comment has been minimized.

Copy link
Contributor Author

masaruh commented Sep 11, 2015

Thanks @bleskes. Pushed to master, 2.x, 2.0 and 1.7.

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.