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
This commit is contained in:
Levi Tamasi 2022-10-03 18:09:56 -07:00 committed by Facebook GitHub Bot
parent 8b430e01dc
commit 3ae00dec90
2 changed files with 7 additions and 5 deletions

View File

@ -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);
}

View File

@ -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