Skip to content

Commit abd70ec

Browse files
committed
The default settings enable checksum verification on every read.
Summary: The default settings enable checksum verification on every read. Test Plan: make check Reviewers: haobo Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D15591
1 parent 3c0dcf0 commit abd70ec

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

db/version_set.cc

-1
Original file line numberDiff line numberDiff line change
@@ -2088,7 +2088,6 @@ Compaction* VersionSet::CompactRange(int input_level, int output_level,
20882088

20892089
Iterator* VersionSet::MakeInputIterator(Compaction* c) {
20902090
ReadOptions options;
2091-
options.verify_checksums = options_->paranoid_checks;
20922091
options.fill_cache = false;
20932092

20942093
// Level-0 files have to be merged together. For other levels,

include/rocksdb/options.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ enum ReadTier {
672672
struct ReadOptions {
673673
// If true, all data read from underlying storage will be
674674
// verified against corresponding checksums.
675-
// Default: false
675+
// Default: true
676676
bool verify_checksums;
677677

678678
// Should the "data block"/"index block"/"filter block" read for this
@@ -713,11 +713,13 @@ struct ReadOptions {
713713

714714
// Specify to create a tailing iterator -- a special iterator that has a
715715
// view of the complete database (i.e. it can also be used to read newly
716-
// added data) and is optimized for sequential reads.
716+
// added data) and is optimized for sequential reads. It will return records
717+
// that were inserted into the database after the creation of the iterator.
718+
// Default: false
717719
bool tailing;
718720

719721
ReadOptions()
720-
: verify_checksums(false),
722+
: verify_checksums(true),
721723
fill_cache(true),
722724
prefix_seek(false),
723725
snapshot(nullptr),

0 commit comments

Comments
 (0)