HBASE-21050 Exclusive lock may be held by a SUCCESS state procedure forever

Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: zhangduo <zhangduo@apache.org>
This commit is contained in:
Allan Yang 2018-08-15 15:36:31 -07:00 committed by Michael Stack
parent 49ae8549cf
commit 159435ee40
1 changed files with 5 additions and 0 deletions

View File

@ -895,6 +895,11 @@ public abstract class Procedure<TEnvironment> implements Comparable<Procedure<TE
return;
}
if (isFinished()) {
LOG.debug("{} is already finished, skip acquiring lock.", this);
return;
}
LOG.debug("{} held the lock before restarting, call acquireLock to restore it.", this);
LockState state = acquireLock(env);
assert state == LockState.LOCK_ACQUIRED;