File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
server/src/main/java/org/elasticsearch Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,10 @@ public boolean hasInactivePrimaries() {
267267 return inactivePrimaryCount > 0 ;
268268 }
269269
270+ public boolean hasInactiveReplicas () {
271+ return inactiveShardCount > inactivePrimaryCount ;
272+ }
273+
270274 public boolean hasInactiveShards () {
271275 return inactiveShardCount > 0 ;
272276 }
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ public void beforeAllocation(final RoutingAllocation allocation) {
118118 @ Override
119119 public void afterPrimariesBeforeReplicas (RoutingAllocation allocation ) {
120120 assert replicaShardAllocator != null ;
121- if (allocation .routingNodes ().hasInactiveShards ()) {
121+ if (allocation .routingNodes ().hasInactiveReplicas ()) {
122122 // cancel existing recoveries if we have a better match
123123 replicaShardAllocator .processExistingRecoveries (allocation );
124124 }
You can’t perform that action at this time.
0 commit comments