From af2115eee59ac15c5df9108fc72589dcc4c1123c Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 24 Sep 2020 13:18:55 -0700 Subject: [PATCH] ircd::db: Add version compatibility for table_properties::num_deletions. --- ircd/db.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index 1ce4cc6f0..abd962354 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2955,10 +2955,21 @@ ircd::db::database::events::OnFlushCompleted(rocksdb::DB *const db, const rocksdb::FlushJobInfo &info) noexcept { + const auto num_deletions + { + #if ROCKSDB_MAJOR > 5 \ + || (ROCKSDB_MAJOR == 5 && ROCKSDB_MINOR > 18) \ + || (ROCKSDB_MAJOR == 5 && ROCKSDB_MINOR == 18 && ROCKSDB_PATCH >= 3) + info.table_properties.num_deletions + #else + 0UL + #endif + }; + char pbuf[2][48]; log::info { - log, "[%s] job:%d ctx:%lu flushed seq[%lu -> %lu] idxs:%lu blks:%lu keys:%lu deletes:%lu data[%s] '%s' `%s'", + log, "[%s] job:%d ctx:%lu flushed seq[%lu -> %lu] idxs:%lu blks:%lu keys:%lu dels:%lu data[%s] '%s' `%s'", d->name, info.job_id, info.thread_id, @@ -2967,7 +2978,7 @@ noexcept info.table_properties.index_partitions, info.table_properties.num_data_blocks, info.table_properties.num_entries, - info.table_properties.num_deletions, + num_deletions, pretty(pbuf[1], iec(info.table_properties.data_size)), info.cf_name, info.file_path,