From 587be50508872cc066d848dbb8b14d0851422009 Mon Sep 17 00:00:00 2001 From: xzh1988 Date: Wed, 28 May 2025 17:55:20 +0800 Subject: [PATCH] rocksdb interface port---rdb_mutex_wrapper.h --- storage/rocksdb/rdb_mutex_wrapper.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/storage/rocksdb/rdb_mutex_wrapper.h b/storage/rocksdb/rdb_mutex_wrapper.h index e5f4cd5c0..c38910958 100644 --- a/storage/rocksdb/rdb_mutex_wrapper.h +++ b/storage/rocksdb/rdb_mutex_wrapper.h @@ -50,4 +50,13 @@ class Rdb_mutex : public rocksdb::TransactionDBMutex { // Attempt to acquire lock. Return OK on success, or other Status on failure. // If returned status is OK, TransactionDB will eventually call UnLock(). - virtual rocksdb::Status Lock() override; \ No newline at end of file + virtual rocksdb::Status Lock() override; + + // Attempt to acquire lock. If timeout is non-negative, operation should be + // failed after this many microseconds. + // Returns OK on success, + // TimedOut if timed out, + // or other Status on failure. + // If returned status is OK, TransactionDB will eventually call UnLock(). + virtual rocksdb::Status TryLockFor( + int64_t timeout_time MY_ATTRIBUTE((__unused__))) override; \ No newline at end of file -- Gitee