diff --git a/include/ircd/db/sst.h b/include/ircd/db/sst.h index b2596fb2d..b9bafe78f 100644 --- a/include/ircd/db/sst.h +++ b/include/ircd/db/sst.h @@ -33,6 +33,8 @@ struct ircd::db::database::sst::info std::string merge_operator; std::string prefix_extractor; std::string compression; + std::string checksum; + std::string checksum_func; uint64_t format {0}; uint64_t cfid {0}; uint64_t size {0}; diff --git a/ircd/db.cc b/ircd/db.cc index b0039b0a1..dc8b8d774 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -3880,6 +3880,14 @@ ircd::db::database::sst::info::operator=(rocksdb::SstFileMetaData &&md) max_key = std::move(md.largestkey); num_reads = std::move(md.num_reads_sampled); compacting = std::move(md.being_compacted); + + #if ROCKSDB_MAJOR > 6 \ + || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 8) \ + || (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 8 && ROCKSDB_PATCH >= 1) + checksum = std::move(md.file_checksum); + checksum_func = std::move(md.file_checksum_func_name); + #endif + return *this; } diff --git a/modules/console.cc b/modules/console.cc index e125429b5..5d8fb31dd 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -4431,6 +4431,8 @@ _print_sst_info_full(opt &out, close_size("file size", f.size); close_auto("file creation", timestr(f.created, ircd::localtime)); close_auto("file version", f.version); + close_auto("checksum function", f.checksum_func); + close_auto("checksum value", f.checksum); close_auto("level", f.level); close_auto("lowest sequence", f.min_seq); close_auto("highest sequence", f.max_seq);