File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ public final class LockProcedure extends Procedure<MasterProcedureEnv>
9090 // DEFAULT_LOCAL_MASTER_LOCKS_TIMEOUT_MS (10 min) so that there is no need to heartbeat.
9191 private final CountDownLatch lockAcquireLatch ;
9292
93+ private volatile boolean suspended = false ;
94+
9395 @ Override
9496 public TableName getTableName () {
9597 return tableName ;
@@ -219,9 +221,10 @@ public void unlock(final MasterProcedureEnv env) {
219221 locked .set (false );
220222 // Maybe timeout already awakened the event and the procedure has finished.
221223 synchronized (event ) {
222- if (!event .isReady ()) {
224+ if (!event .isReady () && suspended ) {
223225 setState (ProcedureProtos .ProcedureState .RUNNABLE );
224226 event .wake (env .getProcedureScheduler ());
227+ suspended = false ;
225228 }
226229 }
227230 }
@@ -244,6 +247,7 @@ protected Procedure<MasterProcedureEnv>[] execute(final MasterProcedureEnv env)
244247 event .suspend ();
245248 event .suspendIfNotReady (this );
246249 setState (ProcedureProtos .ProcedureState .WAITING_TIMEOUT );
250+ suspended = true ;
247251 }
248252 throw new ProcedureSuspendedException ();
249253 }
You can’t perform that action at this time.
0 commit comments