diff --git a/db/corruption_test.cc b/db/corruption_test.cc index f0397b6f5b..18da2621a4 100644 --- a/db/corruption_test.cc +++ b/db/corruption_test.cc @@ -326,7 +326,8 @@ TEST(CorruptionTest, CompactionInputError) { TEST(CorruptionTest, CompactionInputErrorParanoid) { Options options; options.paranoid_checks = true; - options.write_buffer_size = 1048576; + options.write_buffer_size = 131072; + options.max_write_buffer_number = 2; Reopen(&options); DBImpl* dbi = reinterpret_cast(db_); @@ -349,7 +350,7 @@ TEST(CorruptionTest, CompactionInputErrorParanoid) { Status s; std::string tmp1, tmp2; bool failed = false; - for (int i = 0; i < 10000 && s.ok(); i++) { + for (int i = 0; i < 10000; i++) { s = db_->Put(WriteOptions(), Key(i, &tmp1), Value(i, &tmp2)); if (!s.ok()) { failed = true; diff --git a/include/rocksdb/options.h b/include/rocksdb/options.h index d1c532167a..4ed2d65389 100644 --- a/include/rocksdb/options.h +++ b/include/rocksdb/options.h @@ -257,6 +257,8 @@ struct ColumnFamilyOptions { // Number of files to trigger level-0 compaction. A value <0 means that // level-0 compaction will not be triggered by number of files at all. + // + // Default: 4 int level0_file_num_compaction_trigger; // Soft limit on number of level-0 files. We start slowing down writes at this