From e3183eae77bc272cff93799117d0d748d80c1512 Mon Sep 17 00:00:00 2001 From: sdong Date: Fri, 5 Feb 2021 22:48:54 -0800 Subject: [PATCH] Stress test to allow memtable whole key filter (#7937) Summary: Right now, stress test cannot be configured to use memtable whole key filter without prefix filter. It doesn't appear to be necessary. remove this constraint. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7937 Test Plan: "make crash_test" to be able to run. Reviewed By: ltamasi Differential Revision: D26295532 fbshipit-source-id: 30c874a9dc2b672a460603a4ee32368674e0face --- db_stress_tool/db_stress_tool.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/db_stress_tool/db_stress_tool.cc b/db_stress_tool/db_stress_tool.cc index 8721df3ca..00dd1f1a3 100644 --- a/db_stress_tool/db_stress_tool.cc +++ b/db_stress_tool/db_stress_tool.cc @@ -153,10 +153,11 @@ int db_stress_tool(int argc, char** argv) { "test_batches_snapshots test!\n"); exit(1); } - if (FLAGS_memtable_prefix_bloom_size_ratio > 0.0 && FLAGS_prefix_size < 0) { + if (FLAGS_memtable_prefix_bloom_size_ratio > 0.0 && FLAGS_prefix_size < 0 && + !FLAGS_memtable_whole_key_filtering) { fprintf(stderr, - "Error: please specify positive prefix_size in order to use " - "memtable_prefix_bloom_size_ratio\n"); + "Error: please specify positive prefix_size or enable whole key " + "filtering in order to use memtable_prefix_bloom_size_ratio\n"); exit(1); } if ((FLAGS_readpercent + FLAGS_prefixpercent + FLAGS_writepercent +