From 7aaf49c185c1237605cbce63561e0e2c97b93d17 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 31 Aug 2026 18:50:11 +0300 Subject: [PATCH 1/2] RockDB fix for MacOS --- rocks/src/storages/rocks/client.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rocks/src/storages/rocks/client.cpp b/rocks/src/storages/rocks/client.cpp index 2123290c0a35..3558cf34ce63 100644 --- a/rocks/src/storages/rocks/client.cpp +++ b/rocks/src/storages/rocks/client.cpp @@ -1,9 +1,9 @@ #include #include +#include #include #include - #include #include @@ -18,11 +18,17 @@ namespace storages::rocks { namespace { +#if ROCKSDB_MAJOR > 9 +using RawDbPointerType = std::unique_ptr db_; +#else +using RawDbPointerType = rocksdb::DB*; +#endif + std::shared_ptr OpenPlain(const std::string& db_path) { rocksdb::Options options; options.create_if_missing = true; - rocksdb::DB* db_raw{}; + RawDbPointerType db_raw{}; const rocksdb::Status status = rocksdb::DB::Open(options, db_path, &db_raw); if (!status.ok()) { throw RequestFailedException("Create client", status.ToString()); From c3cfc1430f1e3496bdaa7a3d3c12303a3337580f Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 31 Aug 2026 19:40:18 +0300 Subject: [PATCH 2/2] fix --- rocks/src/storages/rocks/client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rocks/src/storages/rocks/client.cpp b/rocks/src/storages/rocks/client.cpp index 3558cf34ce63..a287accd2975 100644 --- a/rocks/src/storages/rocks/client.cpp +++ b/rocks/src/storages/rocks/client.cpp @@ -1,10 +1,10 @@ #include #include -#include #include #include #include +#include #include #include @@ -19,7 +19,7 @@ namespace storages::rocks { namespace { #if ROCKSDB_MAJOR > 9 -using RawDbPointerType = std::unique_ptr db_; +using RawDbPointerType = std::unique_ptr; #else using RawDbPointerType = rocksdb::DB*; #endif @@ -33,7 +33,7 @@ std::shared_ptr OpenPlain(const std::string& db_path) { if (!status.ok()) { throw RequestFailedException("Create client", status.ToString()); } - return std::shared_ptr(db_raw); + return std::shared_ptr(std::move(db_raw)); } } // namespace