@Override
    public void containsKey(final byte[] key, final KVStoreClosure closure) {
        final Timer.Context timeCtx = getTimeContext("CONTAINS_KEY");
        final Lock readLock = this.readWriteLock.readLock();
        readLock.lock();
        try {
            boolean exists = false;
            Holder<byte[]> valueHolder = new Holder<>();
            if (this.db.keyMayExist(key, valueHolder)) {
                if (valueHolder.getValue() != null) {
                    // the key is found in memory
                    exists = true;
                } else {
                    exists = this.db.get(key) != null;
                }
            }
            setSuccess(closure, exists);
        } catch (final Exception e) {
            LOG.error("Fail to [CONTAINS_KEY], key: [{}], {}.", BytesUtil.toHex(key), StackTraceUtil.stackTrace(e));
            setFailure(closure, "Fail to [CONTAINS_KEY]");
        } 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