You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2022/11/02 04:10:28 UTC

[incubator-kvrocks] 01/01: Revert "✨ feat: use rocksdb v7 (#1056)"

This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch revert-1056-rocksdb-7
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git

commit 79c8a9b3825dad1b44a90128fcfa0058861b73c0
Author: hulk <hu...@gmail.com>
AuthorDate: Wed Nov 2 12:10:23 2022 +0800

    Revert "✨ feat: use rocksdb v7 (#1056)"
    
    This reverts commit 684bcc6ce7060ab507627b8299b8326e9ffbf133.
---
 cmake/rocksdb.cmake    | 4 ++--
 src/stats/disk_stats.h | 2 +-
 src/storage/storage.cc | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/rocksdb.cmake b/cmake/rocksdb.cmake
index 24bc2759..d95533ff 100644
--- a/cmake/rocksdb.cmake
+++ b/cmake/rocksdb.cmake
@@ -26,8 +26,8 @@ endif()
 include(cmake/utils.cmake)
 
 FetchContent_DeclareGitHubWithMirror(rocksdb
-  facebook/rocksdb v7.7.3
-  MD5=5b4837735d6205efd1a6e1b8b554ac89
+  facebook/rocksdb v6.29.5
+  MD5=b7efb227f10a668adcb914c973f19648
 )
 
 FetchContent_GetProperties(jemalloc)
diff --git a/src/stats/disk_stats.h b/src/stats/disk_stats.h
index 1cf18eed..5890640a 100644
--- a/src/stats/disk_stats.h
+++ b/src/stats/disk_stats.h
@@ -30,7 +30,7 @@ namespace Redis {
 class Disk : public Database {
  public:
   explicit Disk(Engine::Storage *storage, const std::string &ns) : Database(storage, ns) {
-    option_.include_memtables = true;
+    option_.include_memtabtles = true;
     option_.include_files = true;
   }
   rocksdb::Status GetApproximateSizes(const Metadata &metadata, const Slice &ns_key,
diff --git a/src/storage/storage.cc b/src/storage/storage.cc
index 0777ebf3..d3cc0e54 100644
--- a/src/storage/storage.cc
+++ b/src/storage/storage.cc
@@ -586,7 +586,7 @@ uint64_t Storage::GetTotalSize(const std::string &ns) {
 
   Redis::Database db(this, ns);
   uint64_t size, total_size = 0;
-  rocksdb::DB::SizeApproximationFlags include_both =
+  uint8_t include_both =
       rocksdb::DB::SizeApproximationFlags::INCLUDE_FILES | rocksdb::DB::SizeApproximationFlags::INCLUDE_MEMTABLES;
   for (auto cf_handle : cf_handles_) {
     if (cf_handle == GetCFHandle(kPubSubColumnFamilyName) || cf_handle == GetCFHandle(kPropagateColumnFamilyName)) {