]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
db/log_reader: treat bad record length or checksum as kEof
authorSage Weil <sage@redhat.com>
Wed, 2 Dec 2015 21:38:46 +0000 (16:38 -0500)
committerSage Weil <sage@redhat.com>
Wed, 2 Dec 2015 21:38:46 +0000 (16:38 -0500)
commitf8f92078247066ae57dd16079258e2452addd9b0
tree561edad8ee809c0197186e4be06b153362dcc2fd
parent58244ee54f2d50ee9926e83c50c1064a48f931c9
db/log_reader: treat bad record length or checksum as kEof

If we are in kTolerateCorruptedTailRecords, treat these errors as the
end of the log.  This is particularly important for recycled logs, where
we will regularly see corrupted headers (bad length or checksum) when
replaying a log.  If we are aligned with a block boundary or get lucky,
we will land on an old header and see the log nubmer mismatch, but more
commonly we will land midway through some previously and effectively
see noise.

Signed-off-by: Sage Weil <sage@redhat.com>
db/log_reader.cc