From 3ae00dec908924504527ff1346731fa4d5338fef Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Mon, 3 Oct 2022 18:09:56 -0700 Subject: [PATCH] Disable ingestion in stress tests when PutEntity is used (#10769) Summary: `SstFileWriter` currently does not support the `PutEntity` API, so in `TestIngestExternalFile` all key-values are written using regular `Put`s. This violates the assumption that whether or not a key corresponds to a plain old key-value or a wide-column entity can be determined by solely looking at the "value base" used when generating the value. The patch fixes this issue by disabling ingestion when `PutEntity` is enabled in the stress tests. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10769 Test Plan: Ran a simple blackbox stress test. Reviewed By: akankshamahajan15 Differential Revision: D40042132 Pulled By: ltamasi fbshipit-source-id: 93e75ff55545b7b69fa4ddef1d96093c961158a0 --- db_stress_tool/db_stress_tool.cc | 9 +++++---- tools/db_crashtest.py | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/db_stress_tool/db_stress_tool.cc b/db_stress_tool/db_stress_tool.cc index f7b768aa5..6c5e952db 100644 --- a/db_stress_tool/db_stress_tool.cc +++ b/db_stress_tool/db_stress_tool.cc @@ -295,11 +295,12 @@ int db_stress_tool(int argc, char** argv) { } if (FLAGS_use_put_entity_one_in > 0 && - (FLAGS_use_merge || FLAGS_use_full_merge_v1 || FLAGS_use_txn || - FLAGS_test_multi_ops_txns || FLAGS_user_timestamp_size > 0)) { + (FLAGS_ingest_external_file_one_in > 0 || FLAGS_use_merge || + FLAGS_use_full_merge_v1 || FLAGS_use_txn || FLAGS_test_multi_ops_txns || + FLAGS_user_timestamp_size > 0)) { fprintf(stderr, - "PutEntity is currently incompatible with Merge, transactions, and " - "user-defined timestamps\n"); + "PutEntity is currently incompatible with SstFileWriter, Merge," + " transactions, and user-defined timestamps\n"); exit(1); } diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index a2245ade1..f194a0ddb 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -604,8 +604,9 @@ def finalize_and_sanitize(src_params): if (dest_params.get("use_txn") == 1 and dest_params.get("txn_write_policy") != 0): dest_params["sync_fault_injection"] = 0 dest_params["manual_wal_flush_one_in"] = 0 - # PutEntity is currently not supported with Merge + # PutEntity is currently not supported by SstFileWriter or in conjunction with Merge if dest_params["use_put_entity_one_in"] != 0: + dest_params["ingest_external_file_one_in"] = 0 dest_params["use_merge"] = 0 dest_params["use_full_merge_v1"] = 0