From 572396f5f4a3fbacaffcd5b1aa4d33f196a14d42 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 4 May 2020 20:54:46 -0700 Subject: [PATCH] ircd::db: Add Env::Priority:USER (6.1.1). --- ircd/db.cc | 3 +++ ircd/db_env.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/ircd/db.cc b/ircd/db.cc index 977b45c66..de5eab82e 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -8583,6 +8583,9 @@ ircd::db::reflect(const rocksdb::Env::Priority &p) case rocksdb::Env::Priority::BOTTOM: return "BOTTOM"_sv; case rocksdb::Env::Priority::LOW: return "LOW"_sv; case rocksdb::Env::Priority::HIGH: return "HIGH"_sv; + #ifdef IRCD_DB_HAS_ENV_PRIO_USER + case rocksdb::Env::Priority::USER: return "USER"_sv; + #endif case rocksdb::Env::Priority::TOTAL: assert(0); break; } diff --git a/ircd/db_env.h b/ircd/db_env.h index 54a9aef44..0e143a7be 100644 --- a/ircd/db_env.h +++ b/ircd/db_env.h @@ -8,6 +8,12 @@ // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. +#if ROCKSDB_MAJOR > 6 \ +|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 1) \ +|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 1 && ROCKSDB_PATCH >= 1) + #define IRCD_DB_HAS_ENV_PRIO_USER +#endif + /// Internal environment hookup. /// struct ircd::db::database::env final