From 11c0d1310e23f6ed16390fe665ec4ef5b80a34d7 Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Mon, 17 Oct 2022 14:32:59 -0700 Subject: [PATCH] Do not adjust test_batches_snapshots to avoid mixing runs (#10830) Summary: This is a small follow-up to https://github.com/facebook/rocksdb/pull/10821. The goal of that PR was to hold `test_batches_snapshots` fixed across all `db_stress` invocations; however, that patch didn't address the case when `test_batches_snapshots` is unset due to a conflicting `enable_compaction_filter` or `prefix_size` setting. This PR updates the logic so the other parameter is sanitized instead in the case of such conflicts. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10830 Reviewed By: riversand963 Differential Revision: D40444548 Pulled By: ltamasi fbshipit-source-id: 0331265704904b729262adec37139292fcbb7805 --- tools/db_crashtest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 9301e494a..e52afbfd5 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -515,6 +515,11 @@ def finalize_and_sanitize(src_params): else: dest_params["mock_direct_io"] = True + if dest_params["test_batches_snapshots"] == 1: + dest_params["enable_compaction_filter"] = 0 + if dest_params["prefix_size"] < 0: + dest_params["prefix_size"] = 1 + # Multi-key operations are not currently compatible with transactions or # timestamp. if (dest_params.get("test_batches_snapshots") == 1 or @@ -577,11 +582,9 @@ def finalize_and_sanitize(src_params): # Give the iterator ops away to reads. dest_params["readpercent"] += dest_params.get("iterpercent", 10) dest_params["iterpercent"] = 0 - dest_params["test_batches_snapshots"] = 0 if dest_params.get("prefix_size") == -1: dest_params["readpercent"] += dest_params.get("prefixpercent", 20) dest_params["prefixpercent"] = 0 - dest_params["test_batches_snapshots"] = 0 if ( dest_params.get("prefix_size") == -1 and dest_params.get("memtable_whole_key_filtering") == 0