wchevreuil commented on code in PR #8502:
URL: https://github.com/apache/hbase/pull/8502#discussion_r3676272807
##########
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/CacheAwareLoadBalancer.java:
##########
@@ -238,20 +268,38 @@ public long getThrottleDurationMs(RegionPlan plan) {
LOG.debug("Moving region {} to server {} with cache ratio {}. No
throttling needed.",
plan.getRegionInfo().getEncodedName(), plan.getDestination(),
rsRatio.getSecond());
return 0L;
+ }
+ // Skip throttling for regions with low cache ratio on their source server
— there is
+ // negligible cached data to lose, so no warm-up delay is needed on the
destination.
+ float cacheRatioOnSource = getRegionCacheRatioOnSource(plan);
+ if (cacheRatioOnSource < lowCacheRatioThreshold) {
Review Comment:
Yes. See testThrottlingRegionBeyondThreshold and
testThrottlingRegionBelowThreshold in TestCacheAwareLoadBalancer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]