From 5383f1eec4224b50ff633c3c7147c31829c143df Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Thu, 16 Dec 2021 09:04:07 -0800 Subject: [PATCH] Verify recovery correctness in multi-CF blackbox crash test (#9303) Summary: db_crashtest.py uses multiple CFs only when run without flag `--simple`. The previous config set `-test_batches_snapshots=1` in that case for blackbox mode. But `-test_batches_snapshots=1` cannot verify recovery correctness, so it should not always be set for multi-CF blackbox tests. We can instead randomly toggle it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9303 Reviewed By: riversand963 Differential Revision: D33155229 Pulled By: ajkr fbshipit-source-id: 4a6fdc4eddccc8ece664063baf6393ce1c5de6b7 --- tools/db_crashtest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index c34aa805e..cb095c9d0 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -99,6 +99,7 @@ default_params = { "subcompactions": lambda: random.randint(1, 4), "target_file_size_base": 2097152, "target_file_size_multiplier": 2, + "test_batches_snapshots": lambda: random.randint(0, 1), "top_level_index_pinning": lambda: random.randint(0, 3), "unpartitioned_pinning": lambda: random.randint(0, 3), "use_direct_reads": lambda: random.randint(0, 1), @@ -213,7 +214,6 @@ blackbox_default_params = { # since we will be killing anyway, use large value for ops_per_thread "ops_per_thread": 100000000, "set_options_one_in": 10000, - "test_batches_snapshots": 1, } whitebox_default_params = { @@ -221,7 +221,6 @@ whitebox_default_params = { "log2_keys_per_lock": 10, "ops_per_thread": 200000, "random_kill_odd": 888887, - "test_batches_snapshots": lambda: random.randint(0, 1), } simple_default_params = {