public boolean releasePersistentLock(String lockId) throws Exception {
  DistributedPersistentLock lock=_coordinator.getSiteLocalPersistentLock(lockId);
  if (lock != null) {
    String lockOwner=lock.getLockOwner();
    if (lockOwner == null) {
      _log.info("Upgrade lock is not held by any node");
      return true;
    }
    boolean result=lock.releaseLock(lockOwner);
    if (result) {
      _log.info("Upgrade lock {} released successfully",lockId);
      return true;
    }
 else {
      _log.info("Upgrade lock {} released failed",lockId);
    }
  }
  return false;
}

public boolean releasePersistentLock ( String lockId ) throws Exception { DistributedPersistentLock lock = _coordinator . getSiteLocalPersistentLock ( lockId ) ; if ( lock != null ) { String lockOwner = lock . getLockOwner ( ) ; if ( lockOwner == null ) { _log . info ( "Upgrade lock is not held by any node" ) ; return true ; } boolean result = lock . releaseLock ( lockOwner ) ; if ( result ) { _log . info ( "Upgrade lock {} released successfully" , lockId ) ; return true ; } else { _log . info ( "Upgrade lock {} released failed" , lockId ) ; } } return false ; }
the method to release the persistent upgrade lock . any node which calls the method can release the lock .
