No need to reroute (check for possible shard allocations) when a new *non* data node is added to the cluster, closes #1368.

This commit is contained in:
Shay Banon 2011-09-27 13:47:59 +03:00
parent f63727e3c6
commit 4088236cf7
1 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import org.elasticsearch.cluster.ClusterService;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateListener;
import org.elasticsearch.cluster.ClusterStateUpdateTask;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.RoutingAllocation;
import org.elasticsearch.common.component.AbstractLifecycleComponent;
@ -103,7 +104,12 @@ public class RoutingService extends AbstractLifecycleComponent<RoutingService> i
// reroute();
} else {
if (event.nodesAdded()) {
routingTableDirty = true;
for (DiscoveryNode node : event.nodesDelta().addedNodes()) {
if (node.dataNode()) {
routingTableDirty = true;
break;
}
}
}
}
} else {