diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 37c6418f8..2979a0508 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -72,8 +72,8 @@ def main(argv): --destroy_db_initially=0 --reopen=20 --readpercent=45 - --prefixpercent=0 - --writepercent=40 + --prefixpercent=5 + --writepercent=35 --delpercent=5 --iterpercent=10 --db=%s @@ -93,8 +93,8 @@ def main(argv): --max_background_compactions=20 --max_bytes_for_level_base=10485760 --filter_deletes=%s - --memtablerep=skip_list - --prefix_size=0 + --memtablerep=prefix_hash + --prefix_size=7 """ % (ops_per_thread, threads, write_buf_size, diff --git a/tools/db_crashtest2.py b/tools/db_crashtest2.py index eba8ebad9..68cc42cf3 100644 --- a/tools/db_crashtest2.py +++ b/tools/db_crashtest2.py @@ -86,8 +86,8 @@ def main(argv): --destroy_db_initially=0 --reopen=20 --readpercent=45 - --prefixpercent=0 - --writepercent=40 + --prefixpercent=5 + --writepercent=35 --delpercent=5 --iterpercent=10 --db=%s @@ -107,8 +107,8 @@ def main(argv): --max_background_compactions=20 --max_bytes_for_level_base=10485760 --filter_deletes=%s - --memtablerep=skip_list - --prefix_size=0 + --memtablerep=prefix_hash + --prefix_size=7 %s """ % (random.randint(0, 1), threads, diff --git a/tools/db_stress.cc b/tools/db_stress.cc index f17a8a48f..b7b8e91ea 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -328,7 +328,7 @@ enum RepFactory StringToRepFactory(const char* ctype) { return kSkipList; } static enum RepFactory FLAGS_rep_factory; -DEFINE_string(memtablerep, "skip_list", ""); +DEFINE_string(memtablerep, "prefix_hash", ""); static bool ValidatePrefixSize(const char* flagname, int32_t value) { if (value < 0 || value > 8) { @@ -1525,6 +1525,12 @@ int main(int argc, char** argv) { "not positive!\n"); exit(1); } + if (FLAGS_test_batches_snapshots && FLAGS_prefix_size <= 0) { + fprintf(stderr, + "Error: please specify prefix_size for " + "test_batches_snapshots test!\n"); + exit(1); + } if ((FLAGS_readpercent + FLAGS_prefixpercent + FLAGS_writepercent + FLAGS_delpercent + FLAGS_iterpercent) != 100) { fprintf(stderr,