From 72dc9c5b4fb5b1d9c30e64879f5dded47fa85900 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 9 Jul 2015 11:29:41 +0200 Subject: [PATCH] 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 --- .../cluster/routing/allocation/AllocationService.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java index 991d121f2c8..c02ad4ea075 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java @@ -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