diff --git a/HISTORY.md b/HISTORY.md index 5b3856632..a4d28e0c1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -10,6 +10,7 @@ ### Bug Fixes * Avoid creating empty SSTs and subsequently deleting them in certain cases during compaction. * Sync CURRENT file contents during checkpoint. +* Fix format_version 4 bug with partitioned filters ## 5.16.0 (8/21/2018) ### Public API Change diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 7384d3d85..c71c8c99d 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -56,6 +56,7 @@ default_params = { "write_buffer_size": 4 * 1024 * 1024, "writepercent": 35, "format_version": lambda: random.randint(2, 4), + "index_block_restart_interval": lambda: random.choice(1, 16), } _TEST_DIR_ENV_VAR = 'TEST_TMPDIR' diff --git a/tools/db_stress.cc b/tools/db_stress.cc index f012771b8..45a7c9a0d 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -232,6 +232,11 @@ DEFINE_int32( static_cast(rocksdb::BlockBasedTableOptions().format_version), "Format version of SST files."); +DEFINE_int32(index_block_restart_interval, + rocksdb::BlockBasedTableOptions().index_block_restart_interval, + "Number of keys between restart points " + "for delta encoding of keys in index block."); + DEFINE_int32(max_background_compactions, rocksdb::Options().max_background_compactions, "The maximum number of concurrent background compactions " @@ -2296,6 +2301,8 @@ class StressTest { block_based_options.block_size = FLAGS_block_size; block_based_options.format_version = static_cast(FLAGS_format_version); + block_based_options.index_block_restart_interval = + static_cast(FLAGS_index_block_restart_interval); block_based_options.filter_policy = filter_policy_; options_.table_factory.reset( NewBlockBasedTableFactory(block_based_options));