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

ircd::db: Add delta encoding indicator to SST info; add to console cmd output.

This commit is contained in:
Jason Volk 2020-06-09 20:37:30 -07:00
parent c037519246
commit 7a53afc4c8
3 changed files with 6 additions and 1 deletions

View file

@ -57,6 +57,7 @@ struct ircd::db::database::sst::info
int32_t version {-1};
time_t created {0};
time_t oldest_key {0};
bool delta_encoding {false};
info(const database &, const string_view &filename);
info() = default;

View file

@ -3796,6 +3796,7 @@ ircd::db::database::sst::info::operator=(rocksdb::TableProperties &&tp)
fixed_key_len = std::move(tp.fixed_key_len);
created = std::move(tp.creation_time);
oldest_key = std::move(tp.oldest_key_time);
delta_encoding = std::move(tp.index_value_is_delta_encoded);
return *this;
}

View file

@ -4022,7 +4022,9 @@ _print_sst_info(opt &out,
<< std::setw(12) << f.name
<< " " << std::setw(32) << std::left << (f.created? timef(tmbuf, f.created, ircd::localtime) : string_view{})
<< " " << std::setw(5) << std::right << trunc(f.compression, 5)
<< " " << std::setw(3) << std::left << (!f.filter.empty()? 'F' : ' ')
<< " " << std::setw(1) << std::left << (!f.filter.empty()? 'F' : ' ')
<< std::setw(1) << std::left << (f.delta_encoding? 'D' : ' ')
<< std::setw(1) << std::left << (true? ' ' : ' ')
<< " " << std::setw(24) << std::left << pretty(pbuf, iec(f.size))
<< " " << std::setw(10) << std::right << f.min_seq << " : " << std::setw(10) << std::left << f.max_seq
<< " " << std::setw(10) << std::right << min_key << " : " << std::setw(10) << std::left << max_key
@ -4099,6 +4101,7 @@ _print_sst_info_full(opt &out,
close_auto("range deletes", f.range_deletes);
close_auto("compacting", f.compacting? "yes"_sv : "no"_sv);
close_auto("compression", f.compression);
close_auto("delta encode", f.delta_encoding? "yes"_sv : "no"_sv);
close_auto("", "");
const auto blocks_size{f.keys_size + f.values_size};