Skip to content

Commit

Permalink
Allocation: ThrottlingAllocationDecider should not counting relocatin…
Browse files Browse the repository at this point in the history
…g shards

The ThrottlingAllocationDecider is responsible to limit the number of incoming/local recoveries on a node. It therefore shouldn't count shards marked as relocating which represent the source of the recovery.

Closes #12409
  • Loading branch information
bleskes committed Jul 24, 2015
1 parent e997342 commit 57cbce2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* node. The default is <tt>4</tt></li>
* <p/>
* <li><tt>cluster.routing.allocation.node_concurrent_recoveries</tt> -
* restricts the number of concurrent recovery operations on a single node. The
* restricts the number of total concurrent shards initializing on a single node. The
* default is <tt>2</tt></li>
* </ul>
* <p/>
Expand Down Expand Up @@ -106,7 +106,7 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing
public Decision canAllocate(RoutingNode node, RoutingAllocation allocation) {
int currentRecoveries = 0;
for (ShardRouting shard : node) {
if (shard.initializing() || shard.relocating()) {
if (shard.initializing()) {
currentRecoveries++;
}
}
Expand Down

0 comments on commit 57cbce2

Please sign in to comment.