mirror of https://github.com/facebook/rocksdb.git
Sanitize checkpoint_one_in and lock_wal_one_in db_stress params (#13068)
Summary: Checkpoint creation skips flushing the memtable, even if explicitly requested, when the WAL is locked. This can happen if the user calls `LockWAL()`. In this case, db_stress checkpoint verification fails as the checkpoint will not contain keys present in the primary DB's memtable. Sanitize `checkpoint_one_in` and `lock_wal_one_in` so they're mutually exclusive. Pull Request resolved: https://github.com/facebook/rocksdb/pull/13068 Reviewed By: hx235 Differential Revision: D64353998 Pulled By: anand1976 fbshipit-source-id: 7c93563347f033b6008a47a7d71471e59747e143
This commit is contained in:
parent
dd76862b00
commit
cbebbad7d9
|
@ -47,7 +47,7 @@ default_params = {
|
|||
"charge_filter_construction": lambda: random.choice([0, 1]),
|
||||
"charge_table_reader": lambda: random.choice([0, 1]),
|
||||
"charge_file_metadata": lambda: random.choice([0, 1]),
|
||||
"checkpoint_one_in": lambda: random.choice([10000, 1000000]),
|
||||
"checkpoint_one_in": lambda: random.choice([0, 0, 10000, 1000000]),
|
||||
"compression_type": lambda: random.choice(
|
||||
["none", "snappy", "zlib", "lz4", "lz4hc", "xpress", "zstd"]
|
||||
),
|
||||
|
@ -965,6 +965,10 @@ def finalize_and_sanitize(src_params):
|
|||
):
|
||||
# At least one must be true
|
||||
dest_params["write_dbid_to_manifest"] = 1
|
||||
# Checkpoint creation skips flush if the WAL is locked, so enabling lock_wal_one_in
|
||||
# can cause checkpoint verification to fail. So make the two mutually exclusive.
|
||||
if dest_params.get("checkpoint_one_in") != 0:
|
||||
dest_params["lock_wal_one_in"] = 0
|
||||
return dest_params
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue