@Override
    public void initFencingToken(final byte[] parentKey, final byte[] childKey) {
        final Timer.Context timeCtx = getTimeContext("INIT_FENCING_TOKEN");
        final Lock readLock = this.readWriteLock.readLock();
        readLock.lock();
        try {
            final byte[] realKey = BytesUtil.nullToEmpty(parentKey);
            final byte[] parentBytesVal = this.db.get(this.fencingHandle, realKey);
            if (parentBytesVal == null) {
                return;
            }
            this.db.put(this.fencingHandle, this.writeOptions, childKey, parentBytesVal);
        } catch (final RocksDBException e) {
            throw new StorageException("Fail to init fencing token.", e);
        } finally {
            readLock.unlock();
            timeCtx.stop();
        }
    }
Local KV store based on RocksDB

@author dennis
@author jiachun.fjc
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RocksRawKVStore.java