Skip to content

Commit

Permalink
Remove rocksdb
Browse files Browse the repository at this point in the history
  • Loading branch information
poodlewars committed Aug 12, 2024
1 parent 7724448 commit 102b1c0
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 445 deletions.
2 changes: 1 addition & 1 deletion cpp/CMake/FindLZ4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ find_package_handle_standard_args(LZ4

if (LZ4_FOUND)
# `lz4_FOUND` needs to be defined because:
# - Other dependencies (such as RocksDB) also resolve LZ4 using `find_package(lz4 ...)`
# - Other dependencies also resolve LZ4 using `find_package(lz4 ...)`
# - CMake's syntax is case-sensitive
#
# See:
Expand Down
22 changes: 0 additions & 22 deletions cpp/arcticdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ if(NOT ${ARCTICDB_USING_CONDA})
find_package(Libevent CONFIG REQUIRED)
set(ARCTICDB_MONGO_LIBS $<IF:$<TARGET_EXISTS:mongo::mongocxx_static>,mongo::mongocxx_static,mongo::mongocxx_shared>)
set(Zstd_LIBRARY $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)

if(NOT DEFINED ARCTICDB_INCLUDE_ROCKSDB)
set(ARCTICDB_INCLUDE_ROCKSDB 1)
endif()
else()

# ARCTICDB_USING_CONDA is used in header of the files including vendored
Expand Down Expand Up @@ -95,13 +91,6 @@ add_library(xxHash STATIC IMPORTED)
set_target_properties(xxHash PROPERTIES IMPORTED_LOCATION ${xxHash_LIBRARY})
set_target_properties(xxHash PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${xxHash_INCLUDE_DIR})

# RocksDB can be manually excluded with set(ARCTICDB_INCLUDE_ROCKSDB 0)
# Default is to include on PyPI builds and exclude on conda builds
if(${ARCTICDB_INCLUDE_ROCKSDB})
add_compile_definitions(ARCTICDB_INCLUDE_ROCKSDB)
find_package(RocksDB CONFIG REQUIRED)
endif()

# Libraries baked into the internal and external Linux images are found by searching various paths
# On Windows, vcpkg will provide a "Config" which takes precedence
find_library(Pcre_LIBRARY NAMES pcre PATHS /usr/local/lib/libpcre.a REQUIRED)
Expand Down Expand Up @@ -509,13 +498,6 @@ set(arcticdb_srcs
storage/lmdb/lmdb.hpp
)

if(${ARCTICDB_INCLUDE_ROCKSDB})
list (APPEND arcticdb_srcs
storage/rocksdb/rocksdb_storage.hpp
storage/rocksdb/rocksdb_storage.cpp
)
endif()

add_library(arcticdb_core_object OBJECT ${arcticdb_srcs})

if (WIN32)
Expand Down Expand Up @@ -602,10 +584,6 @@ else ()
)
endif ()

if (${ARCTICDB_INCLUDE_ROCKSDB})
list (APPEND arcticdb_core_libraries RocksDB::rocksdb)
endif()

list (APPEND arcticdb_core_libraries Threads::Threads) # comes last for weakreference resolution pthread_atexit in folly

set(arcticdb_core_includes
Expand Down
2 changes: 0 additions & 2 deletions cpp/arcticdb/entity/protobufs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <lmdb_storage.pb.h>
#include <mongo_storage.pb.h>
#include <in_memory_storage.pb.h>
#include <rocksdb_storage.pb.h>
#include <nfs_backed_storage.pb.h>
#include <azure_storage.pb.h>
#include <mapped_file_storage.pb.h>
Expand All @@ -29,7 +28,6 @@ namespace arcticdb::proto {
namespace mapped_file_storage = arcticc::pb2::mapped_file_storage_pb2;
namespace mongo_storage = arcticc::pb2::mongo_storage_pb2;
namespace memory_storage = arcticc::pb2::in_memory_storage_pb2;
namespace rocksdb_storage = arcticc::pb2::rocksdb_storage_pb2;
namespace azure_storage = arcticc::pb2::azure_storage_pb2;
namespace config = arcticc::pb2::config_pb2;
namespace nfs_backed_storage = arcticc::pb2::nfs_backed_storage_pb2;
Expand Down
2 changes: 1 addition & 1 deletion cpp/arcticdb/storage/library_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ std::shared_ptr<Library> LibraryManager::get_library(const LibraryPath& path,
const StorageOverride& storage_override,
const bool ignore_cache) {
if (!ignore_cache) {
// Check global cache first, important for LMDB and RocksDB to only open once from a given process
// Check global cache first, important for LMDB to only open once from a given process
std::lock_guard<std::mutex> lock{open_libraries_mutex_};
if (auto cached = open_libraries_.find(path); cached != open_libraries_.end()) {
return cached -> second;
Expand Down
253 changes: 0 additions & 253 deletions cpp/arcticdb/storage/rocksdb/rocksdb_storage.cpp

This file was deleted.

Loading

0 comments on commit 102b1c0

Please sign in to comment.