From e7525a1fffd0def3cc4c804e0c6070f7dae0d06a Mon Sep 17 00:00:00 2001 From: Hui Xiao Date: Wed, 31 Aug 2022 13:16:39 -0700 Subject: [PATCH] Disable use_txn=1 with sync_fault_injection=1 in db_crashtest.py (#10605) Summary: **Context/Summary:** `ExpectedState` is not aware of transaction-related concept so `use_txn=1 ` is not compatible with `sync_fault_injection=1`. Therefore this PR disabled this combination until we expand our correctness testing to transaction related features. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10605 Test Plan: - Run the following commands to verify `--use_txn` is correctly sanitized - `python3 ./tools/db_crashtest.py blackbox --use_txn=1 --sync_fault_injection=1 ` - `python3 ./tools/db_crashtest.py blackbox --use_txn=0 --sync_fault_injection=1 ` Reviewed By: ajkr Differential Revision: D39121287 Pulled By: hx235 fbshipit-source-id: 7d5d6dd32479ea1c07df4f38322650f3a60def9c --- tools/db_crashtest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 5e889e31f..e13fd45c8 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -485,6 +485,10 @@ def finalize_and_sanitize(src_params): dest_params["delpercent"] += dest_params["delrangepercent"] dest_params["delrangepercent"] = 0 dest_params["ingest_external_file_one_in"] = 0 + # Correctness testing with unsync data loss is not currently compatible + # with transactions + if (dest_params.get("use_txn") == 1): + dest_params["sync_fault_injection"] = 0 if (dest_params.get("disable_wal") == 1 or dest_params.get("sync_fault_injection") == 1): # File ingestion does not guarantee prefix-recoverability when unsynced -- GitLab