Sanitize db_stress arguments when secondary_cache_uri is not empty (#11967)

Summary:
When `secondary_cache_uri` is non-empty and the `cache_type` is not a tiered cache, then sanitize `compressed_secondary_cache_size` to 0.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11967

Test Plan: Run crash test

Reviewed By: akankshamahajan15

Differential Revision: D50346157

Pulled By: anand1976

fbshipit-source-id: 57bcbad2ec81fa736f1539a0a41ed6854ded2077
This commit is contained in:
anand76 2023-10-16 17:28:36 -07:00 committed by Facebook GitHub Bot
parent 018eede679
commit 84af7cf0bd
1 changed files with 4 additions and 0 deletions

View File

@ -700,6 +700,10 @@ def finalize_and_sanitize(src_params):
else:
dest_params["compressed_secondary_cache_ratio"] = 0.0
dest_params["cache_type"] = dest_params["cache_type"].replace("tiered_", "")
else:
if dest_params["secondary_cache_uri"]:
dest_params["compressed_secondary_cache_size"] = 0
dest_params["compressed_secondary_cache_ratio"] = 0.0
if dest_params["use_write_buffer_manager"]:
if (dest_params["cache_size"] <= 0
or dest_params["db_write_buffer_size"] <= 0):