@Override
    public void unlock() {
        final byte[] internalKey = getInternalKey();
        final Acquirer acquirer = getAcquirer();
        try {
            final Owner owner = this.rheaKVStore.releaseLockWith(internalKey, acquirer).get();
            updateOwner(owner);
            if (!owner.isSameAcquirer(acquirer)) {
                final String message = String.format(
                    "an invalid acquirer [%s] trying to unlock, the real owner is [%s]", acquirer, owner);
                throw new InvalidLockAcquirerException(message);
            }
            if (owner.getAcquires() <= 0) {
                tryCancelScheduling();
            }
        } catch (final InvalidLockAcquirerException e) {
            LOG.error("Fail to unlock, {}.", StackTraceUtil.stackTrace(e));
            ThrowUtil.throwException(e);
        } catch (final Throwable t) {
            LOG.error("Fail to unlock: {}, will cancel scheduling, {}.", acquirer, StackTraceUtil.stackTrace(t));
            tryCancelScheduling();
            ThrowUtil.throwException(t);
        }
    }
Default implementation with distributed lock.

@author jiachun.fjc
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultDistributedLock.java