From abd70ecc2b7fe02709955ef14905d1628581b306 Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Thu, 30 Jan 2014 14:58:37 -0800 Subject: [PATCH] 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 --- db/version_set.cc | 1 - include/rocksdb/options.h | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/db/version_set.cc b/db/version_set.cc index 18081d748..89bdc9d49 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -2088,7 +2088,6 @@ Compaction* VersionSet::CompactRange(int input_level, int output_level, Iterator* VersionSet::MakeInputIterator(Compaction* c) { ReadOptions options; - options.verify_checksums = options_->paranoid_checks; options.fill_cache = false; // Level-0 files have to be merged together. For other levels, diff --git a/include/rocksdb/options.h b/include/rocksdb/options.h index da6412aa2..6424e434f 100644 --- a/include/rocksdb/options.h +++ b/include/rocksdb/options.h @@ -672,7 +672,7 @@ enum ReadTier { struct ReadOptions { // If true, all data read from underlying storage will be // verified against corresponding checksums. - // Default: false + // Default: true bool verify_checksums; // Should the "data block"/"index block"/"filter block" read for this @@ -713,11 +713,13 @@ struct ReadOptions { // Specify to create a tailing iterator -- a special iterator that has a // view of the complete database (i.e. it can also be used to read newly - // added data) and is optimized for sequential reads. + // added data) and is optimized for sequential reads. It will return records + // that were inserted into the database after the creation of the iterator. + // Default: false bool tailing; ReadOptions() - : verify_checksums(false), + : verify_checksums(true), fill_cache(true), prefix_seek(false), snapshot(nullptr),