Merge pull request #798 from lntotk:master

PiperOrigin-RevId: 309738404
This commit is contained in:
Victor Costan 2020-05-04 22:47:40 +00:00
commit 5bd5f0f67a

View File

@ -54,13 +54,11 @@ Status Table::Open(const Options& options, RandomAccessFile* file,
// Read the index block
BlockContents index_block_contents;
if (s.ok()) {
ReadOptions opt;
if (options.paranoid_checks) {
opt.verify_checksums = true;
}
s = ReadBlock(file, opt, footer.index_handle(), &index_block_contents);
ReadOptions opt;
if (options.paranoid_checks) {
opt.verify_checksums = true;
}
s = ReadBlock(file, opt, footer.index_handle(), &index_block_contents);
if (s.ok()) {
// We've successfully read the footer and the index block: we're