From a730ff5a460480772a0cd0afc00d82064fa22cdf Mon Sep 17 00:00:00 2001 From: Shivansh Arora Date: Thu, 30 Nov 2023 17:41:32 +0530 Subject: [PATCH] Modify GA to use batchMode flag Signed-off-by: Shivansh Arora --- .../src/main/java/org/opensearch/gateway/GatewayAllocator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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()); }