From 86926d8c6ab00e2acd1e1a99590cc18a1a57a62f Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Wed, 12 Mar 2014 17:35:27 -0700 Subject: [PATCH] DB stress with normal skip list Summary: Hash skip list has issues, causing db_stress to fail badly. For now, switching back to skip_list by default before we figure out root cause. Test Plan: db_stress is happy(ier) Reviewers: ljin Reviewed By: ljin CC: leveldb Differential Revision: https://reviews.facebook.net/D16845 --- tools/db_crashtest.py | 8 ++++---- tools/db_crashtest2.py | 8 ++++---- tools/db_stress.cc | 8 +------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 2979a0508..37c6418f8 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=5 - --writepercent=35 + --prefixpercent=0 + --writepercent=40 --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=prefix_hash - --prefix_size=7 + --memtablerep=skip_list + --prefix_size=0 """ % (ops_per_thread, threads, write_buf_size, diff --git a/tools/db_crashtest2.py b/tools/db_crashtest2.py index 68cc42cf3..eba8ebad9 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=5 - --writepercent=35 + --prefixpercent=0 + --writepercent=40 --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=prefix_hash - --prefix_size=7 + --memtablerep=skip_list + --prefix_size=0 %s """ % (random.randint(0, 1), threads, diff --git a/tools/db_stress.cc b/tools/db_stress.cc index c3b17a0e8..47ba12775 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, "prefix_hash", ""); +DEFINE_string(memtablerep, "skip_list", ""); static bool ValidatePrefixSize(const char* flagname, int32_t value) { if (value < 0 || value > 8) { @@ -1519,12 +1519,6 @@ 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,