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
main
Hui Xiao 2 years ago committed by Facebook GitHub Bot
parent 9509003503
commit e7525a1fff
  1. 4
      tools/db_crashtest.py

@ -485,6 +485,10 @@ def finalize_and_sanitize(src_params):
dest_params["delpercent"] += dest_params["delrangepercent"] dest_params["delpercent"] += dest_params["delrangepercent"]
dest_params["delrangepercent"] = 0 dest_params["delrangepercent"] = 0
dest_params["ingest_external_file_one_in"] = 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 if (dest_params.get("disable_wal") == 1 or
dest_params.get("sync_fault_injection") == 1): dest_params.get("sync_fault_injection") == 1):
# File ingestion does not guarantee prefix-recoverability when unsynced # File ingestion does not guarantee prefix-recoverability when unsynced

Loading…
Cancel
Save