Skip to content

Commit

Permalink
Support pipelined write in stress/crash tests
Browse files Browse the repository at this point in the history
Summary: Closes facebook#4019

Differential Revision: D8508681

Pulled By: ajkr

fbshipit-source-id: 23a3c07d642386446e322b02e69cdf70d12ef009
  • Loading branch information
ajkr authored and facebook-github-bot committed Jun 19, 2018
1 parent 8585059 commit 7f3a634
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/db_crashtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"compact_range_one_in": 1000000,
"delpercent": 5,
"destroy_db_initially": 0,
"enable_pipelined_write": lambda: random.randint(0, 1),
"expected_values_path": expected_values_file.name,
"max_background_compactions": 20,
"max_bytes_for_level_base": 10485760,
Expand Down
3 changes: 3 additions & 0 deletions tools/db_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ DEFINE_int32(value_size_mult, 8,

DEFINE_int32(compaction_readahead_size, 0, "Compaction readahead size");

DEFINE_bool(enable_pipelined_write, false, "Pipeline WAL/memtable writes");

DEFINE_bool(verify_before_write, false, "Verify before write");

DEFINE_bool(histogram, false, "Print histogram of operation timings");
Expand Down Expand Up @@ -2178,6 +2180,7 @@ class StressTest {
options_.max_subcompactions = static_cast<uint32_t>(FLAGS_subcompactions);
options_.allow_concurrent_memtable_write =
FLAGS_allow_concurrent_memtable_write;
options_.enable_pipelined_write = FLAGS_enable_pipelined_write;
options_.enable_write_thread_adaptive_yield =
FLAGS_enable_write_thread_adaptive_yield;
options_.compaction_options_universal.size_ratio =
Expand Down

0 comments on commit 7f3a634

Please sign in to comment.