diff --git a/server/src/main/java/org/opensearch/gateway/GatewayAllocator.java b/server/src/main/java/org/opensearch/gateway/GatewayAllocator.java index 8b3e1af8ec7e7..53b01287a6e21 100644 --- a/server/src/main/java/org/opensearch/gateway/GatewayAllocator.java +++ b/server/src/main/java/org/opensearch/gateway/GatewayAllocator.java @@ -199,8 +199,7 @@ protected static void innerAllocatedUnassigned( public AllocateUnassignedDecision explainUnassignedShardAllocation(ShardRouting unassignedShard, RoutingAllocation routingAllocation) { assert unassignedShard.unassigned(); assert routingAllocation.debugDecision(); - boolean batchMode = routingAllocation.nodes().getMinNodeVersion().onOrAfter(Version.CURRENT); - if (batchMode) { + if (this.batchMode) { if (getBatchId(unassignedShard, unassignedShard.primary()) == null) { createAndUpdateBatches(routingAllocation, unassignedShard.primary()); }