]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
db/log_reader: handle modified CRCs
authorSage Weil <sage@redhat.com>
Tue, 29 Sep 2015 02:51:45 +0000 (22:51 -0400)
committerSage Weil <sage@redhat.com>
Tue, 29 Sep 2015 02:51:45 +0000 (22:51 -0400)
commit296d6cfc7086fb1b59a6895442e9ace85565577d
treeb8386cbae291f3ca3b411925b78c15ffd1b969aa
parentafece3338b992d0fc515c2847d4ddf8df3446332
db/log_reader: handle modified CRCs

If we detect a CRC error on the first record of a log file, check to see
whether the CRC has the log_number mixed in.  If so, we set the recycled_
flag, and thereafter assume that the CRC will have log_number mixed in.
This raises our probability of a false-positive CRC to 2/2^32 only
for the first record, but leaves it at 1/2^32 for the rest of each file.

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