mirror of https://github.com/apache/druid.git
coordinator slight optimze load rule to skip drop if numToDrop is 0 (#5928)
This commit is contained in:
parent
d5a3871864
commit
0a472d3fa0
|
@ -322,7 +322,11 @@ public abstract class LoadRule implements Rule
|
|||
} else {
|
||||
final int currentReplicantsInTier = entry.getIntValue();
|
||||
final int numToDrop = currentReplicantsInTier - targetReplicants.getOrDefault(tier, 0);
|
||||
if (numToDrop > 0) {
|
||||
numDropped = dropForTier(numToDrop, holders, segment, params.getBalancerStrategy());
|
||||
} else {
|
||||
numDropped = 0;
|
||||
}
|
||||
}
|
||||
|
||||
stats.addToTieredStat(DROPPED_COUNT, tier, numDropped);
|
||||
|
|
Loading…
Reference in New Issue