summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/format/bulk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/format/bulk.c')
-rw-r--r--src/third_party/wiredtiger/test/format/bulk.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/test/format/bulk.c b/src/third_party/wiredtiger/test/format/bulk.c
index 72c17366639..bfbddaffaa5 100644
--- a/src/third_party/wiredtiger/test/format/bulk.c
+++ b/src/third_party/wiredtiger/test/format/bulk.c
@@ -171,8 +171,12 @@ wts_load(void)
break;
}
- /* Restart the enclosing transaction every 5K operations so we don't overflow the cache. */
- if (keyno % 5000 == 0) {
+ /*
+ * When first starting up, restart the enclosing transaction every 10 operations so we never
+ * end up with an empty object. After 5K records, restart the transaction every 5K records
+ * so we don't overflow the cache.
+ */
+ if ((keyno < 5000 && keyno % 10 == 0) || keyno % 5000 == 0) {
/* Report on progress. */
track("bulk load", keyno, NULL);
@@ -190,6 +194,8 @@ wts_load(void)
* aren't surprised).
*/
if (keyno != g.c_rows + 1) {
+ testutil_assert(committed_keyno > 0);
+
g.rows = committed_keyno;
g.c_rows = (uint32_t)committed_keyno;
config_print(false);