From 70d6476c8e4ffab0aa289c839194575417bd2cc3 Mon Sep 17 00:00:00 2001 From: Hui Xiao Date: Thu, 27 Jun 2024 10:27:15 -0700 Subject: [PATCH] fix --- tools/db_crashtest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 41337f443be8..e09592f85570 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -760,6 +760,8 @@ def finalize_and_sanitize(src_params): # Currently we trace all user writes regardless of whether it later succeeds or not. # To simplify, we disable any user write failure injection. # TODO(hx235): support tracing user writes with failure injection. + # TODO(hx235): support excluding WAL from metadata write fault injection so we don't + # have to disable metadata write fault injection to other file dest_params["metadata_write_fault_one_in"] = 0 dest_params["exclude_wal_from_write_fault_injection"] = 1 # Only under WritePrepared txns, unordered_write would provide the same guarnatees as vanilla rocksdb @@ -891,6 +893,16 @@ def finalize_and_sanitize(src_params): dest_params["prefixpercent"] = 0 dest_params["check_multiget_consistency"] = 0 dest_params["check_multiget_entity_consistency"] = 0 + if dest_params.get("disable_wal") == 1 and dest_params.get("reopen") > 0: + # Reopen with WAL currently requires persisting WAL data before closing for reopen. + # Previous injected WAL write errors may not be cleared by the time of closing and ready + # for persisting WAL. + # To simplify, we disable any WAL write error injection. + # TODO(hx235): support WAL write error injection with reopen + # TODO(hx235): support excluding WAL from metadata write fault injection so we don't + # have to disable metadata write fault injection to other file + dest_params["exclude_wal_from_write_fault_injection"] = 1 + dest_params["metadata_write_fault_one_in"] = 0 if dest_params.get("disable_wal") == 1: # disableWAL and recycle_log_file_num options are not mutually # compatible at the moment