@@ -117,8 +117,6 @@ public ClusterState applyStartedShards(ClusterState clusterState, List<ShardRout
117
117
return clusterState ;
118
118
}
119
119
RoutingNodes routingNodes = getMutableRoutingNodes (clusterState );
120
- // shuffle the unassigned shards, just so we won't have things like poison failed shards
121
- routingNodes .unassigned ().shuffle ();
122
120
RoutingAllocation allocation = new RoutingAllocation (
123
121
allocationDeciders ,
124
122
routingNodes ,
@@ -197,8 +195,6 @@ public ClusterState applyFailedShards(
197
195
ClusterState tmpState = IndexMetadataUpdater .removeStaleIdsWithoutRoutings (clusterState , staleShards , logger );
198
196
199
197
RoutingNodes routingNodes = getMutableRoutingNodes (tmpState );
200
- // shuffle the unassigned shards, just so we won't have things like poison failed shards
201
- routingNodes .unassigned ().shuffle ();
202
198
long currentNanoTime = currentNanoTime ();
203
199
RoutingAllocation allocation = new RoutingAllocation (
204
200
allocationDeciders ,
@@ -274,8 +270,6 @@ public ClusterState applyFailedShards(
274
270
*/
275
271
public ClusterState disassociateDeadNodes (ClusterState clusterState , boolean reroute , String reason ) {
276
272
RoutingNodes routingNodes = getMutableRoutingNodes (clusterState );
277
- // shuffle the unassigned shards, just so we won't have things like poison failed shards
278
- routingNodes .unassigned ().shuffle ();
279
273
RoutingAllocation allocation = new RoutingAllocation (
280
274
allocationDeciders ,
281
275
routingNodes ,
@@ -479,8 +473,6 @@ public ClusterState reroute(ClusterState clusterState, String reason) {
479
473
ClusterState fixedClusterState = adaptAutoExpandReplicas (clusterState );
480
474
481
475
RoutingNodes routingNodes = getMutableRoutingNodes (fixedClusterState );
482
- // shuffle the unassigned shards, just so we won't have things like poison failed shards
483
- routingNodes .unassigned ().shuffle ();
484
476
RoutingAllocation allocation = new RoutingAllocation (
485
477
allocationDeciders ,
486
478
routingNodes ,
0 commit comments