Skip to content

Commit

Permalink
build: Remove LevelDB support
Browse files Browse the repository at this point in the history
Whereas new LevelDB packages are build with -fno-rtti and break our
attempts to compile against them,

and whereas LevelDB has been deprecated for some time, with the Ceph
team expending great effort to migrating OSDs off of it,

let it be therefore removed.

Signed-off-by: Adam C. Emerson <[email protected]>
  • Loading branch information
adamemerson committed Nov 1, 2021
1 parent 352399d commit 447564e
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 925 deletions.
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,6 @@ if(LINUX)
endif()
endif()

option(WITH_LEVELDB "LevelDB is here" ON)
if(WITH_LEVELDB)
if(LEVELDB_PREFIX)
include_directories(SYSTEM ${LEVELDB_PREFIX}/include)
link_directories(${LEVELDB_PREFIX}/lib)
endif()
find_package(leveldb REQUIRED)
find_file(HAVE_LEVELDB_FILTER_POLICY leveldb/filter_policy.h PATHS ${LEVELDB_INCLUDE_DIR})
endif(WITH_LEVELDB)

find_package(snappy REQUIRED)

option(WITH_BROTLI "Brotli compression support" OFF)
Expand Down
1 change: 0 additions & 1 deletion ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ BuildRequires: gperftools-devel >= 2.6.1
BuildRequires: gperftools-devel >= 2.4
%endif
%endif
BuildRequires: leveldb-devel > 1.2
BuildRequires: libaio-devel
BuildRequires: libblkid-devel >= 2.17
BuildRequires: cryptsetup-devel
Expand Down
18 changes: 0 additions & 18 deletions cmake/modules/Findleveldb.cmake

This file was deleted.

1 change: 0 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Build-Depends: automake,
librdmacm-dev,
libkeyutils-dev,
libldap2-dev,
libleveldb-dev,
liblttng-ust-dev,
liblua5.3-dev,
liblz4-dev (>= 0.0~r131),
Expand Down
6 changes: 0 additions & 6 deletions src/include/config-h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
/* PMEM_DEVICE (OSD) conditional compilation */
#cmakedefine HAVE_BLUESTORE_PMEM

/* Defined if LevelDB supports bloom filters */
#cmakedefine HAVE_LEVELDB_FILTER_POLICY

/* Define if you have tcmalloc */
#cmakedefine HAVE_LIBTCMALLOC
#cmakedefine LIBTCMALLOC_MISSING_ALIGNED_ALLOC
Expand Down Expand Up @@ -157,9 +154,6 @@
/* define if radosgw enabled */
#cmakedefine WITH_RADOSGW

/* define if leveldb is enabled */
#cmakedefine WITH_LEVELDB

/* define if radosgw has openssl support */
#cmakedefine WITH_CURL_OPENSSL

Expand Down
6 changes: 1 addition & 5 deletions src/kv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ set(kv_srcs
rocksdb_cache/ShardedCache.cc
rocksdb_cache/BinnedLRUCache.cc)

if (WITH_LEVELDB)
list(APPEND kv_srcs LevelDBStore.cc)
endif (WITH_LEVELDB)

add_library(kv STATIC ${kv_srcs}
$<TARGET_OBJECTS:common_prioritycache_obj>)

target_link_libraries(kv ${LEVELDB_LIBRARIES}
target_link_libraries(kv
RocksDB::RocksDB
heap_profiler)
13 changes: 0 additions & 13 deletions src/kv/KeyValueDB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// vim: ts=8 sw=2 smarttab

#include "KeyValueDB.h"
#ifdef WITH_LEVELDB
#include "LevelDBStore.h"
#endif
#include "MemDB.h"
#include "RocksDBStore.h"

Expand All @@ -16,11 +13,6 @@ KeyValueDB *KeyValueDB::create(CephContext *cct, const string& type,
map<string,string> options,
void *p)
{
#ifdef WITH_LEVELDB
if (type == "leveldb") {
return new LevelDBStore(cct, dir);
}
#endif
if (type == "rocksdb") {
return new RocksDBStore(cct, dir, options, p);
}
Expand All @@ -33,11 +25,6 @@ KeyValueDB *KeyValueDB::create(CephContext *cct, const string& type,

int KeyValueDB::test_init(const string& type, const string& dir)
{
#ifdef WITH_LEVELDB
if (type == "leveldb") {
return LevelDBStore::_test_init(dir);
}
#endif
if (type == "rocksdb") {
return RocksDBStore::_test_init(dir);
}
Expand Down
4 changes: 2 additions & 2 deletions src/kv/KeyValueDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* Defines virtual interface to be implemented by key value store
*
* Kyoto Cabinet or LevelDB should implement this
* Kyoto Cabinet should implement this
*/
class KeyValueDB {
public:
Expand Down Expand Up @@ -153,7 +153,7 @@ class KeyValueDB {

virtual void close() { }

/// Try to repair K/V database. leveldb and rocksdb require that database must be not opened.
/// Try to repair K/V database. rocksdb requires that database must be not opened.
virtual int repair(std::ostream &out) { return 0; }

virtual Transaction get_transaction() = 0;
Expand Down
Loading

0 comments on commit 447564e

Please sign in to comment.