From 7818d19169d65759979e9bccda881c7637fb8c0a Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Thu, 27 Jan 2022 23:10:26 -0800 Subject: [PATCH] Fix^2 prefix extractor testing in crash test (#9463) Summary: Even after https://github.com/facebook/rocksdb/issues/9461 could see ``` Error: please specify prefix_size for test_batches_snapshots test! ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/9463 Test Plan: run `make blackbox_crashtest` for a long time. (Unfortunately, it's taking a long time to reproduce these failures) Reviewed By: akankshamahajan15 Differential Revision: D33838152 Pulled By: pdillinger fbshipit-source-id: b9a73c5bbb68df53f14c22b9b52f61d1f7ef38af --- tools/db_crashtest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 20ceee310..bd9561087 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -399,14 +399,15 @@ def finalize_and_sanitize(src_params): 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("test_batches_snapshots") == 0: dest_params["batch_protection_bytes_per_key"] = 0 if (dest_params.get("prefix_size") == -1 and dest_params.get("memtable_whole_key_filtering") == 0): dest_params["memtable_prefix_bloom_size_ratio"] = 0 - if dest_params.get("prefix_size") == -1: - dest_params["readpercent"] += dest_params.get("prefixpercent", 20) - dest_params["prefixpercent"] = 0 return dest_params def gen_cmd_params(args):