0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd::db::database::sst: Add checksum data to info collection.

This commit is contained in:
Jason Volk 2020-08-05 21:32:29 -07:00
parent 439eafa59f
commit 65296be413
3 changed files with 12 additions and 0 deletions

View file

@ -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};

View file

@ -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;
}

View file

@ -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);