guluo2016 commented on code in PR #7519:
URL: https://github.com/apache/hbase/pull/7519#discussion_r2631296652
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java:
##########
@@ -396,8 +399,13 @@ private void loadRegions(List<RegionInfo> regionsToMove)
throws Exception {
}
moveRegionsPool.shutdown();
+ // Calculate timeout based on acknowledge mode. In ack mode, account for
retry attempts since
+ // MoveWithAck retries failed moves up to MOVE_RETRIES_MAX_KEY times. In
no-ack mode, each
+ // region move is attempted only once. Timeout = regions * wait_per_region
* retries
+ int retries = (ack) ? maxRetries : 1;
long timeoutInSeconds = regionsToMove.size()
- * admin.getConfiguration().getLong(MOVE_WAIT_MAX_KEY,
DEFAULT_MOVE_WAIT_MAX);
+ * admin.getConfiguration().getLong(MOVE_WAIT_MAX_KEY,
DEFAULT_MOVE_WAIT_MAX) * retries;
Review Comment:
It seems better to use `this.conf` instead of `admin.getConfiguration()`,
`conf` is an inherited field
--
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]