You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yutong Xiao (Jira)" <ji...@apache.org> on 2021/11/26 05:50:00 UTC

[jira] [Commented] (HBASE-26459) HMaster should move non-meta region only if meta is ONLINE

    [ https://issues.apache.org/jira/browse/HBASE-26459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449381#comment-17449381 ] 

Yutong Xiao commented on HBASE-26459:
-------------------------------------

[~vjasani] Could you please review the MR. Thanks ~

> HMaster should move non-meta region only if meta is ONLINE
> ----------------------------------------------------------
>
>                 Key: HBASE-26459
>                 URL: https://issues.apache.org/jira/browse/HBASE-26459
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 1.7.1
>            Reporter: Viraj Jasani
>            Assignee: Yutong Xiao
>            Priority: Major
>             Fix For: 1.7.2
>
>
> Any non-meta region movement has dependency over meta's availability, hence it is important for any non-meta region to wait for meta to be assigned and be available for scan before attempting to move non-meta region.
> This concept has already been well managed by SCP (ServerCrashProcedure) on HBase 1.x and 2.x versions. However, for 1.x versions, HMaster#move API doesn't check for any prerequisite of meta being available before attempting to move any non-meta region.
> On the other hand, 2.x versions already have TransitRegionStateProcedure (TRSP) in place that uses lock _LockState.LOCK_EVENT_WAIT_ in case if meta is not yet assigned and loaded in AssignmentManager's memory:
> {code:java}
> @Override
> protected boolean waitInitialized(MasterProcedureEnv env) {
>   if (TableName.isMetaTableName(getTableName())) {
>     return false;
>   }
>   // First we need meta to be loaded, and second, if meta is not online then we will likely to
>   // fail when updating meta so we wait until it is assigned.
>   AssignmentManager am = env.getAssignmentManager();
>   return am.waitMetaLoaded(this) || am.waitMetaAssigned(this, getRegion());
> }
>  {code}
> For 1.x versions, it is recommended to introduce configurable wait time in master's region move API for non-meta region movement until meta region is available. If meta remains in transition after the wait time elapses, we should fail fast and avoid non-meta region move.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)