From 5b22beaae77fbc2251048a605d1ea71a190fae22 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 9 Jun 2020 21:14:37 -0700 Subject: [PATCH] ircd::db: Add define for rocksdb timestamp feature versions. ircd::db: Add warning when feature not available. --- ircd/db_env.cc | 2 ++ ircd/db_has.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ircd/db_env.cc b/ircd/db_env.cc index 886a61c65..b98803240 100644 --- a/ircd/db_env.cc +++ b/ircd/db_env.cc @@ -3435,6 +3435,8 @@ catch(const std::exception &e) return error_to_status{e}; } +#else +#warning "RocksDB MultiRead is not supported for this build." #endif IRCD_DB_HAS_ENV_MULTIREAD rocksdb::Status diff --git a/ircd/db_has.h b/ircd/db_has.h index 428e3e3e5..445cd6945 100644 --- a/ircd/db_has.h +++ b/ircd/db_has.h @@ -31,6 +31,12 @@ #define IRCD_DB_HAS_ENV_MULTIREAD #endif +#if ROCKSDB_MAJOR > 6 \ +|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 3) \ +|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 3 && ROCKSDB_PATCH >= 6) + #define IRCD_DB_HAS_TIMESTAMP +#endif + #if ROCKSDB_MAJOR > 6 \ || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 4) \ || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 4 && ROCKSDB_PATCH >= 6)