diff options
Diffstat (limited to 'src/third_party/wiredtiger/test/format/wts.c')
| -rw-r--r-- | src/third_party/wiredtiger/test/format/wts.c | 67 |
1 files changed, 20 insertions, 47 deletions
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c index 00762181a44..dc91c759bf1 100644 --- a/src/third_party/wiredtiger/test/format/wts.c +++ b/src/third_party/wiredtiger/test/format/wts.c @@ -147,61 +147,40 @@ static WT_EVENT_HANDLER event_handler = { * Configure stressing settings. */ static void -configure_timing_stress(char **p, size_t max) +configure_timing_stress(char *p, size_t max) { - CONFIG_APPEND(*p, ",timing_stress_for_test=["); + CONFIG_APPEND(p, ",timing_stress_for_test=["); if (GV(STRESS_AGGRESSIVE_SWEEP)) - CONFIG_APPEND(*p, ",aggressive_sweep"); + CONFIG_APPEND(p, ",aggressive_sweep"); if (GV(STRESS_CHECKPOINT)) - CONFIG_APPEND(*p, ",checkpoint_slow"); + CONFIG_APPEND(p, ",checkpoint_slow"); if (GV(STRESS_CHECKPOINT_PREPARE)) - CONFIG_APPEND(*p, ",prepare_checkpoint_delay"); + CONFIG_APPEND(p, ",prepare_checkpoint_delay"); if (GV(STRESS_CHECKPOINT_RESERVED_TXNID_DELAY)) - CONFIG_APPEND(*p, ",checkpoint_reserved_txnid_delay"); - if (GV(STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION)) - CONFIG_APPEND(*p, ",failpoint_eviction_fail_after_reconciliation"); + CONFIG_APPEND(p, ",checkpoint_reserved_txnid_delay"); if (GV(STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS)) - CONFIG_APPEND(*p, ",failpoint_history_store_delete_key_from_ts"); + CONFIG_APPEND(p, ",failpoint_history_store_delete_key_from_ts"); if (GV(STRESS_HS_CHECKPOINT_DELAY)) - CONFIG_APPEND(*p, ",history_store_checkpoint_delay"); + CONFIG_APPEND(p, ",history_store_checkpoint_delay"); if (GV(STRESS_HS_SEARCH)) - CONFIG_APPEND(*p, ",history_store_search"); + CONFIG_APPEND(p, ",history_store_search"); if (GV(STRESS_HS_SWEEP)) - CONFIG_APPEND(*p, ",history_store_sweep_race"); - if (GV(STRESS_PREPARE_RESOLUTION)) - CONFIG_APPEND(*p, ",prepare_resolution"); + CONFIG_APPEND(p, ",history_store_sweep_race"); if (GV(STRESS_SPLIT_1)) - CONFIG_APPEND(*p, ",split_1"); + CONFIG_APPEND(p, ",split_1"); if (GV(STRESS_SPLIT_2)) - CONFIG_APPEND(*p, ",split_2"); + CONFIG_APPEND(p, ",split_2"); if (GV(STRESS_SPLIT_3)) - CONFIG_APPEND(*p, ",split_3"); + CONFIG_APPEND(p, ",split_3"); if (GV(STRESS_SPLIT_4)) - CONFIG_APPEND(*p, ",split_4"); + CONFIG_APPEND(p, ",split_4"); if (GV(STRESS_SPLIT_5)) - CONFIG_APPEND(*p, ",split_5"); + CONFIG_APPEND(p, ",split_5"); if (GV(STRESS_SPLIT_6)) - CONFIG_APPEND(*p, ",split_6"); + CONFIG_APPEND(p, ",split_6"); if (GV(STRESS_SPLIT_7)) - CONFIG_APPEND(*p, ",split_7"); - CONFIG_APPEND(*p, "]"); -} - -/* - * configure_file_manager -- - * Configure file manager settings. - */ -static void -configure_file_manager(char **p, size_t max) -{ - CONFIG_APPEND(*p, ",file_manager=["); - if (GV(FILE_MANAGER_CLOSE_HANDLE_MINIMUM) != 0) - CONFIG_APPEND(*p, ",close_handle_minimum=%" PRIu32, GV(FILE_MANAGER_CLOSE_HANDLE_MINIMUM)); - if (GV(FILE_MANAGER_CLOSE_IDLE_TIME) != 0) - CONFIG_APPEND(*p, ",close_idle_time=%" PRIu32, GV(FILE_MANAGER_CLOSE_IDLE_TIME)); - if (GV(FILE_MANAGER_CLOSE_SCAN_INTERVAL) != 0) - CONFIG_APPEND(*p, ",close_scan_interval=%" PRIu32, GV(FILE_MANAGER_CLOSE_SCAN_INTERVAL)); - CONFIG_APPEND(*p, "]"); + CONFIG_APPEND(p, ",split_7"); + CONFIG_APPEND(p, "]"); } /* @@ -296,10 +275,7 @@ create_database(const char *home, WT_CONNECTION **connp) CONFIG_APPEND(p, ",statistics=(%s)", GV(STATISTICS) ? "fast" : "none"); /* Optional timing stress. */ - configure_timing_stress(&p, max); - - /* Optional file manager. */ - configure_file_manager(&p, max); + configure_timing_stress(p, max); /* Extensions. */ CONFIG_APPEND(p, ",extensions=[\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"],", @@ -499,10 +475,7 @@ wts_open(const char *home, WT_CONNECTION **connp, WT_SESSION **sessionp, bool al CONFIG_APPEND(p, ",error_prefix=\"%s\"", progname); /* Optional timing stress. */ - configure_timing_stress(&p, max); - - /* Optional file manager. */ - configure_file_manager(&p, max); + configure_timing_stress(p, max); /* If in-memory, there's only a single, shared WT_CONNECTION handle. */ if (GV(RUNS_IN_MEMORY) != 0) |
