mirror of
https://github.com/apache/druid.git
synced 2025-02-19 16:37:45 +00:00
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 {
|
} else {
|
||||||
final int currentReplicantsInTier = entry.getIntValue();
|
final int currentReplicantsInTier = entry.getIntValue();
|
||||||
final int numToDrop = currentReplicantsInTier - targetReplicants.getOrDefault(tier, 0);
|
final int numToDrop = currentReplicantsInTier - targetReplicants.getOrDefault(tier, 0);
|
||||||
|
if (numToDrop > 0) {
|
||||||
numDropped = dropForTier(numToDrop, holders, segment, params.getBalancerStrategy());
|
numDropped = dropForTier(numToDrop, holders, segment, params.getBalancerStrategy());
|
||||||
|
} else {
|
||||||
|
numDropped = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stats.addToTieredStat(DROPPED_COUNT, tier, numDropped);
|
stats.addToTieredStat(DROPPED_COUNT, tier, numDropped);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user