summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrew Kryczka <andrewkr@fb.com>2022-05-06 11:17:08 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2022-05-06 11:17:08 -0700
commit62d84e2a2b4173e4010b76873b333d9a87e1ce2e (patch)
tree299e9378e90a4c597fdb932ae9a3652efdaeea9b /tools
parentb7aaa9876230d78f5e4cc1e524aaa0c4a013e31c (diff)
db_stress fault injection in release mode (#9957)
Summary: Previously all fault injection was ignored in release mode. This PR adds it back except for read fault injection (`--read_fault_one_in > 0`) since its dependency (`IGNORE_STATUS_IF_ERROR`) is unavailable in release mode. Other notable changes include: - Moved `EnableWriteErrorInjection()` for `--write_fault_one_in > 0` so it's after `DB::Open()` without depending on `SyncPoint` - Made `--read_fault_one_in > 0` return an error in release mode - Updated `db_crashtest.py` to always set `--read_fault_one_in=0` in release mode Pull Request resolved: https://github.com/facebook/rocksdb/pull/9957 Test Plan: ``` $ DEBUG_LEVEL=0 make -j24 db_stress $ DEBUG_LEVEL=0 TEST_TMPDIR=/dev/shm python3 tools/db_crashtest.py blackbox ``` Reviewed By: anand1976 Differential Revision: D36193830 Pulled By: ajkr fbshipit-source-id: 0b97946b4e3f06e3e0f6e7833c2763da08ec5321
Diffstat (limited to 'tools')
-rw-r--r--tools/db_crashtest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py
index a7c050f37..7fa5a4d20 100644
--- a/tools/db_crashtest.py
+++ b/tools/db_crashtest.py
@@ -415,6 +415,8 @@ multiops_wp_txn_params = {
def finalize_and_sanitize(src_params):
dest_params = dict([(k, v() if callable(v) else v)
for (k, v) in src_params.items()])
+ if is_release_mode():
+ dest_params['read_fault_one_in'] = 0
if dest_params.get("compression_max_dict_bytes") == 0:
dest_params["compression_zstd_max_train_bytes"] = 0
dest_params["compression_max_dict_buffer_bytes"] = 0