Remove double call to elect primaries

There is no need to call the elect logic twice, we used to need it, but no longer since we handle dangling replicas for unassigned primaries properly
This commit is contained in:
Shay Banon 2015-07-09 11:29:41 +02:00
parent f9a45fd605
commit 72dc9c5b4f

View File

@ -175,8 +175,6 @@ public class AllocationService extends AbstractComponent {
// now allocate all the unassigned to available nodes
if (allocation.routingNodes().hasUnassigned()) {
changed |= shardsAllocators.allocateUnassigned(allocation);
// elect primaries again, in case this is needed with unassigned allocation
changed |= electPrimariesAndUnassignedDanglingReplicas(allocation);
}
// move shards that no longer can be allocated