Skip to content

Commit

Permalink
Remove double call to elect primaries
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kimchy committed Jul 9, 2015
1 parent f9a45fd commit 72dc9c5
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ private boolean reroute(RoutingAllocation allocation) {
// 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
Expand Down

0 comments on commit 72dc9c5

Please sign in to comment.