sst_dump --command=raw to add index offset information (#10873)

Summary:
Add some extra information in outputs of "sst_dump --command=raw" to help debug some issues. Right now, encoded block handle is printed out. It is more useful to directly print out offset and size.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10873

Test Plan: Manually run it against a file and check the output.

Reviewed By: anand1976

Differential Revision: D40742289

fbshipit-source-id: 04d7de26e7f27e1595a7cc3ac1c1082e4e835b93
main
sdong 2 years ago committed by Facebook GitHub Bot
parent 5fef34fd3a
commit 3e686c7cbe
  1. 3
      table/block_based/block_based_table_reader.cc

@ -2981,7 +2981,8 @@ Status BlockBasedTable::DumpIndexBlock(std::ostream& out_stream) {
out_stream << " HEX " << user_key.ToString(true) << ": " out_stream << " HEX " << user_key.ToString(true) << ": "
<< blockhandles_iter->value().ToString(true, << blockhandles_iter->value().ToString(true,
rep_->index_has_first_key) rep_->index_has_first_key)
<< "\n"; << " offset " << blockhandles_iter->value().handle.offset()
<< " size " << blockhandles_iter->value().handle.size() << "\n";
std::string str_key = user_key.ToString(); std::string str_key = user_key.ToString();
std::string res_key(""); std::string res_key("");

Loading…
Cancel
Save