final void doReleaseLock(TEnvironment env, ProcedureStore store) {
    locked = false;
    // persist that we have released the lock. This must be done before we actually release the
    // lock. Another procedure may take this lock immediately after we release the lock, and if we
    // crash before persist the information that we have already released the lock, then when
    // restarting there will be two procedures which both have the lock and cause problems.
    if (getState() != ProcedureState.ROLLEDBACK) {
      // If the state is ROLLEDBACK, it means that we have already deleted the procedure from
      // procedure store, so do not need to log the release operation any more.
      store.update(this);
    }
    releaseLock(env);
  }
Internal method called by the ProcedureExecutor that starts the user-level code releaseLock().
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java