@Override
  public void release(TXLockId txLockId) {
    synchronized (txLockIdList) {
      if (!txLockIdList.contains(txLockId)) {
        // TXLockService.destroyServices can be invoked in cache.close().
        // Other P2P threads could process message such as TXCommitMessage afterwards,
        // and invoke TXLockService.createDTLS(). It could create a new TXLockService
        // which will have a new empty list (txLockIdList) and it will not
        // contain the originally added txLockId
        throw new IllegalArgumentException(
            String.format("Invalid txLockId not found: %s",
                txLockId));
      }

      dlock.releaseTryLocks(txLockId, () -> recovering);

      txLockIdList.remove(txLockId);
      releaseRecoveryReadLock();
    }
  }
The distributed system for cancellation checks.
geode-core/src/main/java/org/apache/geode/internal/cache/locks/TXLockServiceImpl.java