]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Check iterator status BlockBasedTableReader::VerifyChecksumInBlocks() (#6909)
authoranand76 <anand76@devvm1373.frc2.facebook.com>
Fri, 5 Jun 2020 18:06:26 +0000 (11:06 -0700)
committeranand76 <anand76@devvm1373.frc2.facebook.com>
Fri, 5 Jun 2020 18:33:59 +0000 (11:33 -0700)
commit402fe7d4695daa3c52f99a2383cc28245d58c338
tree7b105b49986459e74c6489531c25ee58671a1a34
parent0367cd4370ab5f8c0f530fed1af518874c9573d4
Check iterator status BlockBasedTableReader::VerifyChecksumInBlocks() (#6909)

Summary:
The ```for``` loop in ```VerifyChecksumInBlocks``` only checks ```index_iter->Valid()``` which could be ```false``` either due to reaching the end of the index or, in case of partitioned index, it could be due to a checksum mismatch error when reading a 2nd level index block. Instead of throwing away the index iterator status, we need to return any errors back to the caller.

Tests:
Add a test in block_based_table_reader_test.cc.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6909

Reviewed By: pdillinger

Differential Revision: D21833922

Pulled By: anand1976

fbshipit-source-id: bc778ebf1121dbbdd768689de5183f07a9f0beae
HISTORY.md
db/corruption_test.cc
table/block_based/block_based_table_reader.cc
table/block_based/block_based_table_reader.h
table/block_based/block_based_table_reader_test.cc [new file with mode: 0644]
table/block_based/partitioned_index_iterator.h
test_util/testutil.cc
test_util/testutil.h