summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYanqin Jin <yanqin@fb.com>2022-04-27 17:50:54 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2022-04-27 17:50:54 -0700
commit94e245a14d2a3c57214bb884b843d7f89f5a1bf6 (patch)
treefdd3617ce173d3c9b410f74624531331d74f9aec /tools
parentd9d456de4961526427f792fecb6024a5accf6bd6 (diff)
Improve stress test for MultiOpsTxnsStressTest (#9829)
Summary: Adds more coverage to `MultiOpsTxnsStressTest` with a focus on write-prepared transactions. 1. Add a hack to manually evict commit cache entries. We currently cannot assign small values to `wp_commit_cache_bits` because it requires a prepared transaction to commit within a certain range of sequence numbers, otherwise it will throw. 2. Add coverage for commit-time-write-batch. If write policy is write-prepared, we need to set `use_only_the_last_commit_time_batch_for_recovery` to true. 3. After each flush/compaction, verify data consistency. This is possible since data size can be small: default numbers of primary/secondary keys are just 1000. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9829 Test Plan: ``` TEST_TMPDIR=/dev/shm/rocksdb_crashtest_blackbox/ make blackbox_crash_test_with_multiops_wp_txn ``` Reviewed By: pdillinger Differential Revision: D35806678 Pulled By: riversand963 fbshipit-source-id: d7fde7a29fda0fb481a61f553e0ca0c47da93616
Diffstat (limited to 'tools')
-rw-r--r--tools/db_crashtest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py
index 231f79372..696448989 100644
--- a/tools/db_crashtest.py
+++ b/tools/db_crashtest.py
@@ -383,6 +383,7 @@ multiops_txn_default_params = {
# compactions.
"flush_one_in": 1000,
"key_spaces_path": setup_multiops_txn_key_spaces_file(),
+ "rollback_one_in": 4,
}
multiops_wc_txn_params = {
@@ -401,6 +402,10 @@ multiops_wp_txn_params = {
"enable_pipelined_write": 0,
# OpenReadOnly after checkpoint is not currnetly compatible with WritePrepared txns
"checkpoint_one_in": 0,
+ # Required to be 1 in order to use commit-time-batch
+ "use_only_the_last_commit_time_batch_for_recovery": 1,
+ "recycle_log_file_num": 0,
+ "clear_wp_commit_cache_one_in": 10,
}
def finalize_and_sanitize(src_params):