Sigma-Ma commented on code in PR #8587:
URL: https://github.com/apache/hbase/pull/8587#discussion_r4244363373
##########
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java:
##########
@@ -636,6 +635,7 @@ protected List<RegionPlan> balanceTable(TableName tableName,
currentCost / sumMultiplier, functionCost(), computedMaxSteps);
final String initFunctionTotalCosts = totalCostsPerFunc();
+ cluster.setStopRequestedAt(EnvironmentEdgeManager.currentTime() +
maxRunningTime);
Review Comment:
You're right, this changes the timeout behavior. Initialization currently
counts toward maxRunningTime, and the patch gives the stochastic walk a fresh
budget after initialization.
I checked the history: the timeout already included cost initialization
before HBASE-28513 introduced the shared deadline. I also found that
needsBalance() can invoke conditional candidate generators that check
isStopRequested(). Moving the deadline leaves those checks without the
configured time limit during that phase.
The new test only verifies the ordering, so it doesn't justify the behavior
change.
I'll rework this as a test fix, preserving the existing timeout behavior and
reducing the fixture while keeping the multiple-RS-per-host and
replica-placement coverage.
--
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]