From f842b41310a810d5431333a84ed64c22518a65d6 Mon Sep 17 00:00:00 2001 From: Arpit Bandejiya Date: Thu, 14 Mar 2024 15:47:34 +0530 Subject: [PATCH] Fix the spotless checks Signed-off-by: Arpit Bandejiya --- .../routing/allocation/allocator/LocalShardsBalancer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/LocalShardsBalancer.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/LocalShardsBalancer.java index 2296e6353d16e..6f3098ee683b6 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/LocalShardsBalancer.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/LocalShardsBalancer.java @@ -996,9 +996,7 @@ private boolean tryRelocateShard(BalancedShardsAllocator.ModelNode minNode, Bala } // This is a safety net which prevents un-necessary primary shard relocations from maxNode to minNode when // doing such relocation wouldn't help in primary balance. - if (preferPrimaryBalance == true - && shard.primary() - && maxNode.numPrimaryShards() - minNode.numPrimaryShards() < 2) { + if (preferPrimaryBalance == true && shard.primary() && maxNode.numPrimaryShards() - minNode.numPrimaryShards() < 2) { continue; }