Rename SSD_ROCKSDB_EXPERIMENTAL to WITH_ROCKSDB
This commit is contained in:
parent
c5a8642706
commit
0036bab8a4
|
@ -165,7 +165,7 @@ endif()
|
|||
# RocksDB
|
||||
################################################################################
|
||||
|
||||
set(SSD_ROCKSDB_EXPERIMENTAL ON CACHE BOOL "Build with experimental RocksDB support")
|
||||
set(WITH_ROCKSDB ON CACHE BOOL "Build with experimental RocksDB support")
|
||||
set(PORTABLE_ROCKSDB ON CACHE BOOL "Compile RocksDB in portable mode") # Set this to OFF to compile RocksDB with `-march=native`
|
||||
set(ROCKSDB_SSE42 OFF CACHE BOOL "Compile RocksDB with SSE42 enabled")
|
||||
set(ROCKSDB_AVX ${USE_AVX} CACHE BOOL "Compile RocksDB with AVX enabled")
|
||||
|
@ -245,7 +245,7 @@ function(print_components)
|
|||
message(STATUS "Build Documentation (make html): ${WITH_DOCUMENTATION}")
|
||||
message(STATUS "Build Python sdist (make package): ${WITH_PYTHON_BINDING}")
|
||||
message(STATUS "Configure CTest (depends on Python): ${WITH_PYTHON}")
|
||||
message(STATUS "Build with RocksDB: ${SSD_ROCKSDB_EXPERIMENTAL}")
|
||||
message(STATUS "Build with RocksDB: ${WITH_ROCKSDB}")
|
||||
message(STATUS "Build with AWS SDK: ${WITH_AWS_BACKUP}")
|
||||
message(STATUS "=========================================")
|
||||
endfunction()
|
||||
|
|
|
@ -7,7 +7,7 @@ else()
|
|||
endif()
|
||||
|
||||
|
||||
if(SSD_ROCKSDB_EXPERIMENTAL)
|
||||
if(WITH_ROCKSDB)
|
||||
include(CompileRocksDB)
|
||||
# CompileRocksDB sets `lz4_LIBRARIES` to be the shared lib, we want to link
|
||||
# statically, so find the static library here.
|
||||
|
@ -139,7 +139,7 @@ target_include_directories(fdbserver PRIVATE
|
|||
${CMAKE_BINARY_DIR}/bindings/c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
if (SSD_ROCKSDB_EXPERIMENTAL)
|
||||
if (WITH_ROCKSDB)
|
||||
add_dependencies(fdbserver rocksdb)
|
||||
if(WITH_LIBURING)
|
||||
target_include_directories(fdbserver PRIVATE ${ROCKSDB_INCLUDE_DIR} ${uring_INCLUDE_DIR})
|
||||
|
@ -159,8 +159,8 @@ if(USE_JEMALLOC)
|
|||
endif()
|
||||
|
||||
target_link_libraries(fdbserver PRIVATE toml11_target rapidjson)
|
||||
if(SSD_ROCKSDB_EXPERIMENTAL)
|
||||
target_compile_definitions(fdbserver PRIVATE SSD_ROCKSDB_EXPERIMENTAL)
|
||||
if(WITH_ROCKSDB)
|
||||
target_compile_definitions(fdbserver PRIVATE WITH_ROCKSDB)
|
||||
endif()
|
||||
|
||||
if (WITH_SWIFT)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
|
||||
#include <rocksdb/c.h>
|
||||
#include <rocksdb/cache.h>
|
||||
|
@ -61,7 +61,7 @@
|
|||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
#include "fdbserver/Knobs.h"
|
||||
#include "fdbserver/IKeyValueStore.h"
|
||||
|
@ -69,7 +69,7 @@
|
|||
|
||||
#include "flow/actorcompiler.h" // has to be last include
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
|
||||
// Enforcing rocksdb version.
|
||||
static_assert((ROCKSDB_MAJOR == FDB_ROCKSDB_MAJOR && ROCKSDB_MINOR == FDB_ROCKSDB_MINOR &&
|
||||
|
@ -2538,23 +2538,23 @@ void RocksDBKeyValueStore::Writer::action(RestoreAction& a) {
|
|||
|
||||
} // namespace
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
IKeyValueStore* keyValueStoreRocksDB(std::string const& path,
|
||||
UID logID,
|
||||
KeyValueStoreType storeType,
|
||||
bool checkChecksums,
|
||||
bool checkIntegrity) {
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
return new RocksDBKeyValueStore(path, logID);
|
||||
#else
|
||||
TraceEvent(SevError, "RocksDBEngineInitFailure", logID).detail("Reason", "Built without RocksDB");
|
||||
ASSERT(false);
|
||||
return nullptr;
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
}
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
#include "flow/UnitTest.h"
|
||||
|
||||
namespace {
|
||||
|
@ -2790,4 +2790,4 @@ TEST_CASE("noSim/RocksDB/RangeClear") {
|
|||
}
|
||||
} // namespace
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "fdbclient/FDBTypes.h"
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
|
||||
#include "fdbclient/KeyRangeMap.h"
|
||||
#include "fdbclient/SystemData.h"
|
||||
|
@ -39,14 +39,14 @@
|
|||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
#include "fdbserver/Knobs.h"
|
||||
#include "fdbserver/IKeyValueStore.h"
|
||||
#include "fdbserver/RocksDBCheckpointUtils.actor.h"
|
||||
#include "flow/actorcompiler.h" // has to be last include
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
|
||||
// Enforcing rocksdb version.
|
||||
static_assert((ROCKSDB_MAJOR == FDB_ROCKSDB_MAJOR && ROCKSDB_MINOR == FDB_ROCKSDB_MINOR &&
|
||||
|
@ -3703,23 +3703,23 @@ ACTOR Future<Void> testCheckpointRestore(IKeyValueStore* kvStore, std::vector<Ke
|
|||
}
|
||||
} // namespace
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
IKeyValueStore* keyValueStoreShardedRocksDB(std::string const& path,
|
||||
UID logID,
|
||||
KeyValueStoreType storeType,
|
||||
bool checkChecksums,
|
||||
bool checkIntegrity) {
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
return new ShardedRocksDBKeyValueStore(path, logID);
|
||||
#else
|
||||
TraceEvent(SevError, "ShardedRocksDBEngineInitFailure").detail("Reason", "Built without RocksDB");
|
||||
ASSERT(false);
|
||||
return nullptr;
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
}
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
#include "flow/UnitTest.h"
|
||||
|
||||
namespace {
|
||||
|
@ -4553,4 +4553,4 @@ TEST_CASE("perf/ShardedRocksDB/RangeClearUserKey") {
|
|||
}
|
||||
} // namespace
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "fdbserver/RocksDBCheckpointUtils.actor.h"
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
#include <rocksdb/db.h>
|
||||
#include <rocksdb/env.h>
|
||||
#include <rocksdb/options.h>
|
||||
|
@ -29,7 +29,7 @@
|
|||
#include <rocksdb/sst_file_reader.h>
|
||||
#include <rocksdb/types.h>
|
||||
#include <rocksdb/version.h>
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
#include "fdbclient/FDBTypes.h"
|
||||
#include "fdbclient/NativeAPI.actor.h"
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
#include "flow/actorcompiler.h" // has to be last include
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
|
||||
// Enforcing rocksdb version.
|
||||
static_assert((ROCKSDB_MAJOR == FDB_ROCKSDB_MAJOR && ROCKSDB_MINOR == FDB_ROCKSDB_MINOR &&
|
||||
|
@ -1239,7 +1239,7 @@ ACTOR Future<Void> deleteRocksCheckpoint(CheckpointMetaData checkpoint) {
|
|||
wait(delay(0));
|
||||
return Void();
|
||||
}
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
int64_t getTotalFetchedBytes(const std::vector<CheckpointMetaData>& checkpoints) {
|
||||
int64_t totalBytes = 0;
|
||||
|
@ -1268,29 +1268,29 @@ int64_t getTotalFetchedBytes(const std::vector<CheckpointMetaData>& checkpoints)
|
|||
ICheckpointReader* newRocksDBCheckpointReader(const CheckpointMetaData& checkpoint,
|
||||
const CheckpointAsKeyValues checkpointAsKeyValues,
|
||||
UID logId) {
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
const CheckpointFormat format = checkpoint.getFormat();
|
||||
if (format == DataMoveRocksCF && !checkpointAsKeyValues) {
|
||||
return new RocksDBCFCheckpointReader(checkpoint, logId);
|
||||
} else {
|
||||
return new RocksDBColumnFamilyReader(checkpoint, logId);
|
||||
}
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<IRocksDBSstFileWriter> newRocksDBSstFileWriter() {
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
std::unique_ptr<IRocksDBSstFileWriter> sstWriter = std::make_unique<RocksDBSstFileWriter>();
|
||||
return sstWriter;
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<ICheckpointByteSampleReader> newCheckpointByteSampleReader(const CheckpointMetaData& checkpoint) {
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
return std::make_unique<RocksDBCheckpointByteSampleReader>(checkpoint);
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
#include "fdbserver/RocksDBLogForwarder.h"
|
||||
|
||||
#include "flow/network.h"
|
||||
|
@ -146,4 +146,4 @@ void RocksDBLogForwarder::Logv(const InfoLogLevel log_level, const char* format,
|
|||
}
|
||||
}
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
|
|
@ -78,7 +78,7 @@ bool isSimulatorProcessUnreliable() {
|
|||
namespace {
|
||||
|
||||
constexpr bool hasRocksDB =
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
true
|
||||
#else
|
||||
false
|
||||
|
@ -1803,7 +1803,7 @@ const std::unordered_map<SimulationStorageEngine, StorageEngineConfigFunc> STORA
|
|||
const std::vector<SimulationStorageEngine> SIMULATION_STORAGE_ENGINE = {
|
||||
SimulationStorageEngine::SSD, SimulationStorageEngine::MEMORY,
|
||||
SimulationStorageEngine::RADIX_TREE, SimulationStorageEngine::REDWOOD,
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
SimulationStorageEngine::ROCKSDB, SimulationStorageEngine::SHARDED_ROCKSDB,
|
||||
#endif
|
||||
};
|
||||
|
@ -1845,7 +1845,7 @@ SimulationStorageEngine chooseSimulationStorageEngine(const TestConfig& testConf
|
|||
.detail("StorageEngine", static_cast<uint8_t>(result))
|
||||
.detail("Reason", reason)
|
||||
.detail("Excluded", getExcludedStorageEngineTypesInString(testConfig.storageEngineExcludeTypes))
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
.detail("RocksDBEngineChoosable", true)
|
||||
#else
|
||||
.detail("RocksDBEngineChoosable", false)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <cstdarg>
|
||||
#include <thread>
|
||||
|
||||
#ifdef SSD_ROCKSDB_EXPERIMENTAL
|
||||
#ifdef WITH_ROCKSDB
|
||||
#include <rocksdb/env.h>
|
||||
|
||||
#include "flow/genericactors.actor.h"
|
||||
|
@ -95,6 +95,6 @@ public:
|
|||
virtual void Logv(const rocksdb::InfoLogLevel log_level, const char* format, va_list ap);
|
||||
};
|
||||
|
||||
#endif // SSD_ROCKSDB_EXPERIMENTAL
|
||||
#endif // WITH_ROCKSDB
|
||||
|
||||
#endif // __ROCKSDB_LOG_FORWARDER_H__
|
||||
|
|
|
@ -227,7 +227,7 @@ if(WITH_PYTHON)
|
|||
add_fdb_test(TEST_FILES fast/WriteDuringReadClean.toml)
|
||||
add_fdb_test(TEST_FILES noSim/RandomUnitTests.toml UNIT)
|
||||
|
||||
if(SSD_ROCKSDB_EXPERIMENTAL)
|
||||
if(WITH_ROCKSDB)
|
||||
add_fdb_test(TEST_FILES fast/ValidateStorage.toml)
|
||||
add_fdb_test(TEST_FILES noSim/KeyValueStoreRocksDBTest.toml UNIT)
|
||||
add_fdb_test(TEST_FILES noSim/ShardedRocksDBTest.toml UNIT)
|
||||
|
|
Loading…
Reference in New Issue