From 62cde2641794b6d5cc9211bad3c17d5cd7681d83 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 1 Aug 2020 13:29:52 +0800 Subject: [PATCH] kv: always enable rocksdb RocksDB is included as a submodule of Ceph, there is no need to check for its existence anymore. Signed-off-by: Kefu Chai --- CMakeLists.txt | 2 -- src/include/config-h.in.cmake | 3 --- src/kv/KeyValueDB.cc | 8 -------- 3 files changed, 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6b12db147078..2ccf4c27d6b8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,8 +466,6 @@ if(WITH_REENTRANT_STRSIGNAL) set(HAVE_REENTRANT_STRSIGNAL 1 CACHE INTERNAL "Reentrant strsignal is supported.") endif() -set(HAVE_LIBROCKSDB 1) - # -lz link into kv find_package(ZLIB REQUIRED) diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake index 2befe3ff1697d..1ea3703f620c0 100644 --- a/src/include/config-h.in.cmake +++ b/src/include/config-h.in.cmake @@ -205,9 +205,6 @@ /* Define to 1 if you have fdatasync. */ #cmakedefine HAVE_FDATASYNC 1 -/* Defined if you have librocksdb enabled */ -#cmakedefine HAVE_LIBROCKSDB - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_VALGRIND_HELGRIND_H 1 diff --git a/src/kv/KeyValueDB.cc b/src/kv/KeyValueDB.cc index 6cd3bff797acf..f050040c15622 100644 --- a/src/kv/KeyValueDB.cc +++ b/src/kv/KeyValueDB.cc @@ -6,9 +6,7 @@ #include "LevelDBStore.h" #endif #include "MemDB.h" -#ifdef HAVE_LIBROCKSDB #include "RocksDBStore.h" -#endif using std::map; using std::string; @@ -23,12 +21,9 @@ KeyValueDB *KeyValueDB::create(CephContext *cct, const string& type, return new LevelDBStore(cct, dir); } #endif -#ifdef HAVE_LIBROCKSDB if (type == "rocksdb") { return new RocksDBStore(cct, dir, options, p); } -#endif - if ((type == "memdb") && cct->check_experimental_feature_enabled("memdb")) { return new MemDB(cct, dir, p); @@ -43,12 +38,9 @@ int KeyValueDB::test_init(const string& type, const string& dir) return LevelDBStore::_test_init(dir); } #endif -#ifdef HAVE_LIBROCKSDB if (type == "rocksdb") { return RocksDBStore::_test_init(dir); } -#endif - if (type == "memdb") { return MemDB::_test_init(dir); } -- 2.39.5