summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/format/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/format/config.c')
-rw-r--r--src/third_party/wiredtiger/test/format/config.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/test/format/config.c b/src/third_party/wiredtiger/test/format/config.c
index bbff4a1ab17..40f8053afb8 100644
--- a/src/third_party/wiredtiger/test/format/config.c
+++ b/src/third_party/wiredtiger/test/format/config.c
@@ -256,8 +256,18 @@ config_table(TABLE *table, void *arg)
* direct I/O can be so slow the additional I/O for overflow items causes eviction to stall).
*/
if (GV(RUNS_IN_MEMORY) || GV(DISK_DIRECT_IO)) {
- if (!config_explicit(table, "runs.rows") && TV(RUNS_ROWS) > 1000000)
+ /*
+ * Always limit the row count if its greater that 1,000,000 and in memory wasn't explicitly
+ * set. Direct IO is always explicitly set, never limit the row count because the user has
+ * taken control.
+ */
+ if (GV(RUNS_IN_MEMORY) && TV(RUNS_ROWS) > WT_MILLION &&
+ config_explicit(NULL, "runs.in_memory")) {
+ WARN("limiting table%" PRIu32
+ ".runs.rows to 1,000,000 as runs.in_memory has been automatically enabled",
+ table->id)
config_single(table, "runs.rows=1000000", false);
+ }
if (!config_explicit(table, "btree.key_max"))
config_single(table, "btree.key_max=32", false);
if (!config_explicit(table, "btree.key_min"))
@@ -846,8 +856,15 @@ config_in_memory(void)
if (config_explicit(NULL, "ops.verify"))
return;
- if (!config_explicit(NULL, "runs.in_memory") && mmrand(NULL, 1, 20) == 1)
+ if (!config_explicit(NULL, "runs.in_memory") && mmrand(NULL, 1, 20) == 1) {
config_single(NULL, "runs.in_memory=1", false);
+ /* Use table[0] to access the global value (RUNS_ROWS is a table value). */
+ if ((tables[0]->v[V_TABLE_RUNS_ROWS].v) > WT_MILLION) {
+ WARN("%s",
+ "limiting runs.rows to 1,000,000 as runs.in_memory has been automatically enabled");
+ config_single(NULL, "runs.rows=1000000", true);
+ }
+ }
}
/*