diff --git a/table/sst_file_dumper.cc b/table/sst_file_dumper.cc index da91c1130..85a264d59 100644 --- a/table/sst_file_dumper.cc +++ b/table/sst_file_dumper.cc @@ -196,6 +196,7 @@ Status SstFileDumper::NewTableReader( } Status SstFileDumper::VerifyChecksum() { + assert(read_options_.verify_checksums); // We could pass specific readahead setting into read options if needed. return table_reader_->VerifyChecksum(read_options_, TableReaderCaller::kSSTDumpTool); diff --git a/tools/sst_dump_tool.cc b/tools/sst_dump_tool.cc index 87577ab8e..1b269043a 100644 --- a/tools/sst_dump_tool.cc +++ b/tools/sst_dump_tool.cc @@ -419,6 +419,10 @@ int SSTDumpTool::Run(int argc, char const* const* argv, Options options) { filename = std::string(dir_or_file) + "/" + filename; } + if (command == "verify") { + verify_checksum = true; + } + ROCKSDB_NAMESPACE::SstFileDumper dumper( options, filename, Temperature::kUnknown, readahead_size, verify_checksum, output_hex, decode_blob_index);