Skip to content

Commit b5195f4

Browse files
authored
Fix weight calculation of decideRebalance when explain (#17720)
Signed-off-by: gesong.samuel <[email protected]>
1 parent 8312e42 commit b5195f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/LocalShardsBalancer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ MoveDecision decideRebalance(final ShardRouting shard) {
233233

234234
// balance the shard, if a better node can be found
235235
final String idxName = shard.getIndexName();
236-
final float currentWeight = weight.weight(this, currentNode, idxName);
236+
final float currentWeight = weight.weightWithRebalanceConstraints(this, currentNode, idxName);
237237
final AllocationDeciders deciders = allocation.deciders();
238238
Decision.Type rebalanceDecisionType = Decision.Type.NO;
239239
BalancedShardsAllocator.ModelNode assignedNode = null;

0 commit comments

Comments
 (0)