0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-04 21:08:57 +01:00

ircd::db: Add version compatibility for table_properties::num_deletions.

This commit is contained in:
Jason Volk 2020-09-24 13:18:55 -07:00
parent 563f833ab3
commit af2115eee5

View file

@ -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,