Print smallest and largest seqno in Version::DebugString() for more details (#5231)
Summary: In some cases, we want to known the smallest and largest sequence numbers of sstable files, to help us get more details. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5231 Differential Revision: D15038087 Pulled By: siying fbshipit-source-id: c473c1ca07b53efe2f1884fa1ecdc8686f455ed8
This commit is contained in:
parent
990b2f4cb3
commit
a7d103198e
@ -3235,11 +3235,11 @@ std::string Version::DebugString(bool hex, bool print_stats) const {
|
||||
for (int level = 0; level < storage_info_.num_levels_; level++) {
|
||||
// E.g.,
|
||||
// --- level 1 ---
|
||||
// 17:123['a' .. 'd']
|
||||
// 20:43['e' .. 'g']
|
||||
// 17:123[1 .. 124]['a' .. 'd']
|
||||
// 20:43[124 .. 128]['e' .. 'g']
|
||||
//
|
||||
// if print_stats=true:
|
||||
// 17:123['a' .. 'd'](4096)
|
||||
// 17:123[1 .. 124]['a' .. 'd'](4096)
|
||||
r.append("--- level ");
|
||||
AppendNumberTo(&r, level);
|
||||
r.append(" --- version# ");
|
||||
@ -3252,6 +3252,11 @@ std::string Version::DebugString(bool hex, bool print_stats) const {
|
||||
r.push_back(':');
|
||||
AppendNumberTo(&r, files[i]->fd.GetFileSize());
|
||||
r.append("[");
|
||||
AppendNumberTo(&r, files[i]->fd.smallest_seqno);
|
||||
r.append(" .. ");
|
||||
AppendNumberTo(&r, files[i]->fd.largest_seqno);
|
||||
r.append("]");
|
||||
r.append("[");
|
||||
r.append(files[i]->smallest.DebugString(hex));
|
||||
r.append(" .. ");
|
||||
r.append(files[i]->largest.DebugString(hex));
|
||||
|
Loading…
Reference in New Issue
Block a user