HBASE-22061 SplitTableRegionProcedure should hold the lock of its daughter regions
This commit is contained in:
parent
b4b4854371
commit
c52dd9efa0
|
@ -137,6 +137,26 @@ public class SplitTableRegionProcedure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected LockState acquireLock(final MasterProcedureEnv env) {
|
||||||
|
if (env.getProcedureScheduler().waitRegions(this, getTableName(), getParentRegion(),
|
||||||
|
daughter_1_RI, daughter_2_RI)) {
|
||||||
|
try {
|
||||||
|
LOG.debug(LockState.LOCK_EVENT_WAIT + " " + env.getProcedureScheduler().dumpLocks());
|
||||||
|
} catch (IOException e) {
|
||||||
|
// Ignore, just for logging
|
||||||
|
}
|
||||||
|
return LockState.LOCK_EVENT_WAIT;
|
||||||
|
}
|
||||||
|
return LockState.LOCK_ACQUIRED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void releaseLock(final MasterProcedureEnv env) {
|
||||||
|
env.getProcedureScheduler().wakeRegions(this, getTableName(), getParentRegion(), daughter_1_RI,
|
||||||
|
daughter_2_RI);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the region is splittable
|
* Check whether the region is splittable
|
||||||
* @param env MasterProcedureEnv
|
* @param env MasterProcedureEnv
|
||||||
|
|
Loading…
Reference in New Issue