virajjasani commented on a change in pull request #3875:
URL: https://github.com/apache/hbase/pull/3875#discussion_r757673150
##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
##########
@@ -136,6 +136,12 @@
/** Default value for the max percent of regions in transition */
public static final double DEFAULT_HBASE_MASTER_BALANCER_MAX_RIT_PERCENT =
1.0;
+ /** Time in milliseconds to wait meta region assignment, when moving
non-meta regions. */
+ public static final String HBASE_MASTER_WAITING_META_ASSIGNMENT_TIMEOUT =
+ "hbase.master.waiting.meta.assignment.timeout";
+
+ public static final long
HBASE_MASTER_WAITING_META_ASSIGNMENT_TIMEOUT_DEFAULT = 10000;
Review comment:
I think it's fine to keep 5 sec, my only concern was that sometimes when
the system is overall slow, meta might take few more seconds (which is not good
for the cluster's availability though) and hence before failing this
transaction fast, I thought maybe we can wait for 10s. However this is
subjective to usecase and interpretation of individual users so I think any
value is fine here. We are anyways making this configurable for that reason
only, so let's keep 10 sec maybe and user can configure based on their usecase.
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -1845,12 +1851,21 @@ public void move(final byte[] encodedRegionName,
// closed
serverManager.sendRegionWarmup(rp.getDestination(), hri);
+ // Here wait until all the meta regions are not in transition.
+ if (!hri.isMetaRegion() &&
assignmentManager.getRegionStates().isMetaRegionInTransition()) {
+ Thread.sleep(timeoutWaitMetaRegionAssignment);
+ if (assignmentManager.getRegionStates().isMetaRegionInTransition()) {
+ LOG.error("This is fail-fast of the region move because "
+ + "hbase:meta region is in transition. Failed region move info: "
+ rp);
+ return;
Review comment:
I think we can throw HBaseIOException here since this is fail-fast
scenario?
--
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]