[
https://issues.apache.org/jira/browse/HBASE-26459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani resolved HBASE-26459.
----------------------------------
Hadoop Flags: Reviewed
Resolution: Fixed
Thanks for the contribution [~xytss123].
> 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)