From 8e12638f3d0d91791cf06253493b8b15827f4b6c Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 19 Aug 2019 10:50:25 -0700 Subject: [PATCH] Slightly adjust atomic white box test's kill odd (#5717) Summary: Atomic white box test's kill odd is the same as normal test. However, in the scenario that only WritableFileWriter::Append() is blacklisted, WritableFileWriter::Flush() dominates the killing odds. Normally, most of WritableFileWriter::Flush() are called in WAL writes, where every write triggers a WAL flush. In atomic test, WAL is disabled, so the kill happens less frequently than we antipated. In some rare cases, the kill didn't end up with happening (for reasons I still don't fully understand) and cause the stress test timeout. If WAL is disabled, make the odds 5x likely to trigger. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5717 Test Plan: Run whitebox_crash_test_with_atomic_flush and whitebox_crash_test and observe the kill odds printed out. Differential Revision: D16897237 fbshipit-source-id: cbf5d96f6fc0e980523d0f1f94bf4e72cdb82d1c --- tools/db_crashtest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 709406e56..3d9fbb91b 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -288,8 +288,12 @@ def whitebox_crash_main(args, unknown_args): "kill_random_test": kill_random_test, }) elif kill_mode == 1: + if cmd_params.get('disable_wal', 0) == 1: + my_kill_odd = kill_random_test / 50 + 1 + else: + my_kill_odd = kill_random_test / 10 + 1 additional_opts.update({ - "kill_random_test": (kill_random_test / 10 + 1), + "kill_random_test": my_kill_odd, "kill_prefix_blacklist": "WritableFileWriter::Append," + "WritableFileWriter::WriteBuffered", })