This is an automated email from the ASF dual-hosted git repository.
jihoonson pushed a commit to branch 0.12.2
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/0.12.2 by this push:
new a34d620 coordinator slight optimze load rule to skip drop if
numToDrop is 0 (#5928) (#5986)
a34d620 is described below
commit a34d620de6a9508f15a7b7d8a8187693448613bd
Author: Jihoon Son <[email protected]>
AuthorDate: Mon Jul 9 14:07:22 2018 -0700
coordinator slight optimze load rule to skip drop if numToDrop is 0 (#5928)
(#5986)
---
.../src/main/java/io/druid/server/coordinator/rules/LoadRule.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/io/druid/server/coordinator/rules/LoadRule.java
b/server/src/main/java/io/druid/server/coordinator/rules/LoadRule.java
index 094dedd..b8ea703 100644
--- a/server/src/main/java/io/druid/server/coordinator/rules/LoadRule.java
+++ b/server/src/main/java/io/druid/server/coordinator/rules/LoadRule.java
@@ -322,7 +322,11 @@ public abstract class LoadRule implements Rule
} else {
final int currentReplicantsInTier = entry.getIntValue();
final int numToDrop = currentReplicantsInTier -
targetReplicants.getOrDefault(tier, 0);
- numDropped = dropForTier(numToDrop, holders, segment,
params.getBalancerStrategy());
+ if (numToDrop > 0) {
+ numDropped = dropForTier(numToDrop, holders, segment,
params.getBalancerStrategy());
+ } else {
+ numDropped = 0;
+ }
}
stats.addToTieredStat(DROPPED_COUNT, tier, numDropped);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]