summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClarisse Cheah <clarisse.cheah@mongodb.com>2023-01-09 01:20:25 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-09 02:00:21 +0000
commit2832fd105188727ddfd3f77370cb344257bf8518 (patch)
tree5881124596f0873e34af63135049423838d2d8d5
parent4d30c6111ae6cdc7f6f60656af0e4b632ac6c0a4 (diff)
downloadmongo-2832fd105188727ddfd3f77370cb344257bf8518.tar.gz
Import wiredtiger: 91e10012b2b3d4a75419d2635863a67d523eae3c from branch mongodb-master
ref: 843032e989..91e10012b2 for: 6.3.0-rc0 WT-10438 Literal values use WT defines whenever possible.
-rw-r--r--src/third_party/wiredtiger/bench/tiered/push_pull.c2
-rw-r--r--src/third_party/wiredtiger/bench/wt2853_perf/main.c10
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf.c14
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf.h6
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/block_cache/block_cache.c2
-rw-r--r--src/third_party/wiredtiger/src/bloom/bloom.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_handle.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_random.c6
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_sync.c4
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_log.c8
-rw-r--r--src/third_party/wiredtiger/src/evict/evict_lru.c10
-rw-r--r--src/third_party/wiredtiger/src/include/block_cache.h2
-rw-r--r--src/third_party/wiredtiger/src/include/btree.h4
-rw-r--r--src/third_party/wiredtiger/src/include/cache.h6
-rw-r--r--src/third_party/wiredtiger/src/include/misc_inline.h4
-rw-r--r--src/third_party/wiredtiger/src/include/mutex_inline.h2
-rw-r--r--src/third_party/wiredtiger/src/include/stat.h6
-rw-r--r--src/third_party/wiredtiger/src/log/log.c8
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_manager.c4
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_merge.c4
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_worker.c2
-rw-r--r--src/third_party/wiredtiger/src/meta/meta_table.c2
-rw-r--r--src/third_party/wiredtiger/src/os_win/os_fs.c2
-rw-r--r--src/third_party/wiredtiger/src/os_win/os_time.c4
-rw-r--r--src/third_party/wiredtiger/src/support/hazard.c2
-rw-r--r--src/third_party/wiredtiger/src/support/mtx_rw.c4
-rw-r--r--src/third_party/wiredtiger/src/txn/txn.c4
-rw-r--r--src/third_party/wiredtiger/test/bloom/test_bloom.c2
-rw-r--r--src/third_party/wiredtiger/test/checkpoint/checkpointer.c2
-rw-r--r--src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c4
-rw-r--r--src/third_party/wiredtiger/test/checkpoint/workers.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/incr_backup/main.c12
-rw-r--r--src/third_party/wiredtiger/test/csuite/random_abort/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/random_directio/main.c8
-rw-r--r--src/third_party/wiredtiger/test/csuite/rwlock/main.c8
-rw-r--r--src/third_party/wiredtiger/test/csuite/schema_abort/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/tiered_abort/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c4
-rw-r--r--src/third_party/wiredtiger/test/csuite/truncated_log/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c4
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c12
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c6
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c4
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c6
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c8
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt2999_join_extractor/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c4
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt4699_json/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c2
-rw-r--r--src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c2
-rw-r--r--src/third_party/wiredtiger/test/cursor_order/cursor_order.c4
-rw-r--r--src/third_party/wiredtiger/test/fops/t.c2
-rw-r--r--src/third_party/wiredtiger/test/format/bulk.c3
-rw-r--r--src/third_party/wiredtiger/test/format/config.h2
-rwxr-xr-xsrc/third_party/wiredtiger/test/format/config.sh8
-rw-r--r--src/third_party/wiredtiger/test/format/format_config.c4
-rw-r--r--src/third_party/wiredtiger/test/format/format_config_def.c6
-rw-r--r--src/third_party/wiredtiger/test/format/hs.c2
-rw-r--r--src/third_party/wiredtiger/test/format/import.c2
-rw-r--r--src/third_party/wiredtiger/test/format/ops.c14
-rw-r--r--src/third_party/wiredtiger/test/format/random.c2
-rw-r--r--src/third_party/wiredtiger/test/format/snap.c2
-rw-r--r--src/third_party/wiredtiger/test/format/verify.c3
-rw-r--r--src/third_party/wiredtiger/test/packing/intpack-test.c2
-rw-r--r--src/third_party/wiredtiger/test/packing/intpack-test3.c2
-rw-r--r--src/third_party/wiredtiger/test/readonly/readonly.c2
-rw-r--r--src/third_party/wiredtiger/test/thread/t.c4
-rw-r--r--src/third_party/wiredtiger/test/utility/thread.c2
-rw-r--r--src/third_party/wiredtiger/test/utility/tiered.c4
-rw-r--r--src/third_party/wiredtiger/test/windows/windows_shim.c8
80 files changed, 163 insertions, 163 deletions
diff --git a/src/third_party/wiredtiger/bench/tiered/push_pull.c b/src/third_party/wiredtiger/bench/tiered/push_pull.c
index fd12895142d..876974b7a86 100644
--- a/src/third_party/wiredtiger/bench/tiered/push_pull.c
+++ b/src/third_party/wiredtiger/bench/tiered/push_pull.c
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
/*
* Run test with 100 Mb file size. Row store case.
*/
- run_test_clean("100MB", NUM_RECORDS * 1000);
+ run_test_clean("100MB", NUM_RECORDS * WT_THOUSAND);
flush = true;
}
diff --git a/src/third_party/wiredtiger/bench/wt2853_perf/main.c b/src/third_party/wiredtiger/bench/wt2853_perf/main.c
index 6ef9d66033d..ff4573c0a69 100644
--- a/src/third_party/wiredtiger/bench/wt2853_perf/main.c
+++ b/src/third_party/wiredtiger/bench/wt2853_perf/main.c
@@ -46,8 +46,8 @@ static void create_perf_json(bool, int, int);
#define BLOOM false
#define GAP_WARNINGS 3 /* Threshold for seconds of gap to be displayed */
-#define N_RECORDS 10000
-#define N_INSERT 1000000
+#define N_RECORDS (10 * WT_THOUSAND)
+#define N_INSERT WT_MILLION
#define N_INSERT_THREAD 1
#define N_GET_THREAD 1
#define S64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789::"
@@ -254,7 +254,7 @@ thread_insert(void *arg)
if (__wt_random(&rnd) % 2 == 0)
post = 54321;
else
- post = i % 100000;
+ post = i % (100 * WT_THOUSAND);
if (__wt_random(&rnd) % 2 == 0) {
bal = -100;
flag = 1;
@@ -271,8 +271,8 @@ thread_insert(void *arg)
testutil_assert(ret == 0);
testutil_check(maincur->reset(maincur));
testutil_check(session->commit_transaction(session, NULL));
- if (i % 1000 == 0 && i != 0) {
- if (i % 10000 == 0)
+ if (i % WT_THOUSAND == 0 && i != 0) {
+ if (i % (10 * WT_THOUSAND) == 0)
fprintf(stderr, "*");
else
fprintf(stderr, ".");
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf.c b/src/third_party/wiredtiger/bench/wtperf/wtperf.c
index 2cb4a8a3f40..62e44db8245 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf.c
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf.c
@@ -195,13 +195,13 @@ track_operation(TRACK *trk, uint64_t usecs)
/*
* Update a latency bucket. First buckets: usecs from 100us to 1000us at 100us each.
*/
- if (v < 1000)
+ if (v < WT_THOUSAND)
++trk->us[v];
/*
* Second buckets: milliseconds from 1ms to 1000ms, at 1ms each.
*/
- else if (v < ms_to_us(1000))
+ else if (v < ms_to_us(WT_THOUSAND))
++trk->ms[us_to_ms(v)];
/*
@@ -528,7 +528,7 @@ worker(void *arg)
else
trk = &thread->truncate_sleep;
/* Pause between truncate attempts */
- (void)usleep(1000);
+ (void)usleep(WT_THOUSAND);
break;
}
goto op_err;
@@ -1482,13 +1482,13 @@ scan_worker(void *arg)
if (opts->scan_icount != 0) {
end_id = opts->scan_icount;
tot_items = ((uint64_t)opts->scan_icount * pct) / 100;
- incr = (uint64_t)opts->scan_table_count * 1000 + 1;
+ incr = (uint64_t)opts->scan_table_count * WT_THOUSAND + 1;
table_start = opts->table_count;
ntables = opts->scan_table_count;
} else {
end_id = opts->icount;
tot_items = ((uint64_t)opts->icount * pct) / 100;
- incr = (uint64_t)opts->table_count * 1000 + 1;
+ incr = (uint64_t)opts->table_count * WT_THOUSAND + 1;
table_start = 0;
ntables = opts->table_count;
}
@@ -1609,7 +1609,7 @@ execute_populate(WTPERF *wtperf)
* Sleep for 100th of a second, report_interval is in second granularity, each 100th
* increment of elapsed is a single increment of interval.
*/
- (void)usleep(10000);
+ (void)usleep(10 * WT_THOUSAND);
if (opts->report_interval == 0 || ++elapsed < 100)
continue;
elapsed = 0;
@@ -2953,7 +2953,7 @@ wtperf_rand(WTPERF_THREAD *thread)
rval = (uint64_t)(double)sqrtl((long double)rval128);
#else
-#define SELECT_LATEST_RANGE 1000
+#define SELECT_LATEST_RANGE WT_THOUSAND
/* If we don't have 128-bit integers, we simply select a number from a fixed sized group of
* recently inserted records.
*/
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf.h b/src/third_party/wiredtiger/bench/wtperf/wtperf.h
index ff3b937a651..3f17ff3a2c6 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf.h
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf.h
@@ -256,9 +256,9 @@ typedef struct {
/*
* Latency buckets.
*/
- uint32_t us[1000]; /* < 1us ... 1000us */
- uint32_t ms[1000]; /* < 1ms ... 1000ms */
- uint32_t sec[100]; /* < 1s 2s ... 100s */
+ uint32_t us[WT_THOUSAND]; /* < 1us ... 1000us */
+ uint32_t ms[WT_THOUSAND]; /* < 1ms ... 1000ms */
+ uint32_t sec[100]; /* < 1s 2s ... 100s */
} TRACK;
struct __wtperf_thread { /* Per-thread structure */
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 110643949e8..78bf565b771 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "843032e989c2f01e0da592e50a2bb934b72ebbdd"
+ "commit": "91e10012b2b3d4a75419d2635863a67d523eae3c"
}
diff --git a/src/third_party/wiredtiger/src/block_cache/block_cache.c b/src/third_party/wiredtiger/src/block_cache/block_cache.c
index 77a958b4093..ca08539166d 100644
--- a/src/third_party/wiredtiger/src/block_cache/block_cache.c
+++ b/src/third_party/wiredtiger/src/block_cache/block_cache.c
@@ -598,7 +598,7 @@ __blkcache_init(WT_SESSION_IMPL *session, size_t cache_size, u_int hash_size, u_
WT_RET(__wt_thread_create(
session, &blkcache->evict_thread_tid, __blkcache_eviction_thread, (void *)session));
blkcache->evict_aggressive = -((int)evict_aggressive);
- blkcache->min_num_references = 1000; /* initialize to a large value */
+ blkcache->min_num_references = WT_THOUSAND; /* initialize to a large value */
blkcache->type = type;
diff --git a/src/third_party/wiredtiger/src/bloom/bloom.c b/src/third_party/wiredtiger/src/bloom/bloom.c
index 789427274f2..db7ebed1e57 100644
--- a/src/third_party/wiredtiger/src/bloom/bloom.c
+++ b/src/third_party/wiredtiger/src/bloom/bloom.c
@@ -129,7 +129,7 @@ __bloom_open_cursor(WT_BLOOM *bloom, WT_CURSOR *owner)
* Bump the cache priority for Bloom filters: this makes eviction favor pages from other trees over
* Bloom filters.
*/
-#define WT_EVICT_BLOOM_SKEW 1000
+#define WT_EVICT_BLOOM_SKEW WT_THOUSAND
__wt_evict_priority_set(session, WT_EVICT_BLOOM_SKEW);
bloom->c = c;
diff --git a/src/third_party/wiredtiger/src/btree/bt_handle.c b/src/third_party/wiredtiger/src/btree/bt_handle.c
index 8276692e147..f2cbb05fd1c 100644
--- a/src/third_party/wiredtiger/src/btree/bt_handle.c
+++ b/src/third_party/wiredtiger/src/btree/bt_handle.c
@@ -953,7 +953,7 @@ __btree_page_sizes(WT_SESSION_IMPL *session)
btree->maxmempage = (uint64_t)cval.val;
if (!F_ISSET(conn, WT_CONN_CACHE_POOL) && (cache_size = conn->cache_size) > 0)
btree->maxmempage = (uint64_t)WT_MIN(
- btree->maxmempage, (conn->cache->eviction_dirty_trigger * cache_size) / 1000);
+ btree->maxmempage, (conn->cache->eviction_dirty_trigger * cache_size) / WT_THOUSAND);
/* Enforce a lower bound of a single disk leaf page */
btree->maxmempage = WT_MAX(btree->maxmempage, btree->maxleafpage);
diff --git a/src/third_party/wiredtiger/src/btree/bt_random.c b/src/third_party/wiredtiger/src/btree/bt_random.c
index dbfb81a5c1e..214be58ad13 100644
--- a/src/third_party/wiredtiger/src/btree/bt_random.c
+++ b/src/third_party/wiredtiger/src/btree/bt_random.c
@@ -45,7 +45,7 @@ __random_slot_valid(WT_CURSOR_BTREE *cbt, uint32_t slot, bool *validp)
}
/* Magic constant: 5000 entries in a skip list is enough to forcibly evict. */
-#define WT_RANDOM_SKIP_EVICT_SOON 5000
+#define WT_RANDOM_SKIP_EVICT_SOON (5 * WT_THOUSAND)
/* Magic constant: 50 entries in a skip list is enough to predict the size. */
#define WT_RANDOM_SKIP_PREDICT 50
@@ -154,7 +154,7 @@ __random_leaf_skip(WT_CURSOR_BTREE *cbt, WT_INSERT_HEAD *ins_head, uint32_t entr
/* Magic constant: 100 entries in any randomly chosen skip list is enough to select from it. */
#define WT_RANDOM_SKIP_INSERT_ENOUGH 100
/* Magic constant: 1000 entries in an initial skip list is enough to always select from it. */
-#define WT_RANDOM_SKIP_INSERT_SMALLEST_ENOUGH 1000
+#define WT_RANDOM_SKIP_INSERT_SMALLEST_ENOUGH WT_THOUSAND
/*
* __random_leaf_insert --
@@ -255,7 +255,7 @@ __random_leaf_disk(WT_CURSOR_BTREE *cbt, bool *validp)
/* Magic constant: cursor up to 250 next/previous records before selecting a key. */
#define WT_RANDOM_CURSOR_MOVE 250
/* Magic constant: 1000 disk-based entries in a page is enough to always select from them. */
-#define WT_RANDOM_DISK_ENOUGH 1000
+#define WT_RANDOM_DISK_ENOUGH WT_THOUSAND
/*
* __random_leaf --
diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c
index 597ab79315e..088022c68bb 100644
--- a/src/third_party/wiredtiger/src/btree/bt_sync.c
+++ b/src/third_party/wiredtiger/src/btree/bt_sync.c
@@ -666,7 +666,7 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
++internal_pages;
/* Slow down checkpoints. */
if (FLD_ISSET(conn->debug_flags, WT_CONN_DEBUG_SLOW_CKPT))
- __wt_sleep(0, 10000);
+ __wt_sleep(0, 10 * WT_THOUSAND);
} else {
leaf_bytes += page->memory_footprint;
++leaf_pages;
@@ -713,7 +713,7 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
++conn->ckpt_write_pages;
/* Periodically log checkpoint progress. */
- if (conn->ckpt_write_pages % 5000 == 0)
+ if (conn->ckpt_write_pages % (5 * WT_THOUSAND) == 0)
__wt_checkpoint_progress(session, false);
}
}
diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c
index a21cdf4459a..68346a0fe2d 100644
--- a/src/third_party/wiredtiger/src/conn/conn_log.c
+++ b/src/third_party/wiredtiger/src/conn/conn_log.c
@@ -626,7 +626,7 @@ __log_file_server(void *arg)
}
/* Wait until the next event. */
- __wt_cond_wait(session, conn->log_file_cond, 100000, NULL);
+ __wt_cond_wait(session, conn->log_file_cond, 100 * WT_THOUSAND, NULL);
}
if (0) {
@@ -1022,8 +1022,8 @@ __wt_logmgr_open(WT_SESSION_IMPL *session)
*/
WT_RET(__wt_open_internal_session(
conn, "log-wrlsn-server", false, session_flags, 0, &conn->log_wrlsn_session));
- WT_RET(__wt_cond_auto_alloc(
- conn->log_wrlsn_session, "log write lsn server", 10000, WT_MILLION, &conn->log_wrlsn_cond));
+ WT_RET(__wt_cond_auto_alloc(conn->log_wrlsn_session, "log write lsn server", 10 * WT_THOUSAND,
+ WT_MILLION, &conn->log_wrlsn_cond));
WT_RET(__wt_thread_create(
conn->log_wrlsn_session, &conn->log_wrlsn_tid, __log_wrlsn_server, conn->log_wrlsn_session));
conn->log_wrlsn_tid_set = true;
@@ -1042,7 +1042,7 @@ __wt_logmgr_open(WT_SESSION_IMPL *session)
WT_RET(__wt_open_internal_session(
conn, "log-server", false, session_flags, 0, &conn->log_session));
WT_RET(__wt_cond_auto_alloc(
- conn->log_session, "log server", 50000, WT_MILLION, &conn->log_cond));
+ conn->log_session, "log server", 50 * WT_THOUSAND, WT_MILLION, &conn->log_cond));
/*
* Start the thread.
diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c
index 5669aed9667..d7215e7850d 100644
--- a/src/third_party/wiredtiger/src/evict/evict_lru.c
+++ b/src/third_party/wiredtiger/src/evict/evict_lru.c
@@ -95,7 +95,7 @@ __evict_entry_priority(WT_SESSION_IMPL *session, WT_REF *ref)
read_gen += btree->evict_priority;
-#define WT_EVICT_INTL_SKEW 1000
+#define WT_EVICT_INTL_SKEW WT_THOUSAND
if (F_ISSET(ref, WT_REF_FLAG_INTERNAL))
read_gen += WT_EVICT_INTL_SKEW;
@@ -450,7 +450,7 @@ __evict_server(WT_SESSION_IMPL *session, bool *did_work)
__wt_epoch(session, &now);
-#define WT_CACHE_STUCK_TIMEOUT_MS 300000
+#define WT_CACHE_STUCK_TIMEOUT_MS (300 * WT_THOUSAND)
time_diff_ms = WT_TIMEDIFF_MS(now, cache->stuck_time);
#ifdef HAVE_DIAGNOSTIC
@@ -965,7 +965,7 @@ __wt_evict_file_exclusive_off(WT_SESSION_IMPL *session)
/*
* We will do a fresh re-tune every that many milliseconds to adjust to significant phase changes.
*/
-#define EVICT_FORCE_RETUNE 25000
+#define EVICT_FORCE_RETUNE (25 * WT_THOUSAND)
/*
* __evict_tune_workers --
@@ -1149,7 +1149,7 @@ __evict_lru_pages(WT_SESSION_IMPL *session, bool is_server)
/* If a worker thread found the queue empty, pause. */
if (ret == WT_NOTFOUND && !is_server && F_ISSET(conn, WT_CONN_EVICTION_RUN))
- __wt_cond_wait(session, conn->evict_threads.wait_cond, 10000, NULL);
+ __wt_cond_wait(session, conn->evict_threads.wait_cond, 10 * WT_THOUSAND, NULL);
WT_TRACK_OP_END(session);
return (ret == WT_NOTFOUND ? 0 : ret);
@@ -2447,7 +2447,7 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, bool readonly, d
break;
case WT_NOTFOUND:
/* Allow the queue to re-populate before retrying. */
- __wt_cond_wait(session, conn->evict_threads.wait_cond, 10000, NULL);
+ __wt_cond_wait(session, conn->evict_threads.wait_cond, 10 * WT_THOUSAND, NULL);
cache->app_waits++;
break;
default:
diff --git a/src/third_party/wiredtiger/src/include/block_cache.h b/src/third_party/wiredtiger/src/include/block_cache.h
index 536d0950d2b..0ac7a700f97 100644
--- a/src/third_party/wiredtiger/src/include/block_cache.h
+++ b/src/third_party/wiredtiger/src/include/block_cache.h
@@ -26,7 +26,7 @@
#define WT_BLKCACHE_HASHSIZE_MAX WT_GIGABYTE
/* How often we compute the total size of the files open in the block manager. */
-#define WT_BLKCACHE_FILESIZE_EST_FREQ 5000
+#define WT_BLKCACHE_FILESIZE_EST_FREQ (5 * WT_THOUSAND)
#define WT_BLKCACHE_MINREF_INCREMENT 20 /* Eviction references window */
#define WT_BLKCACHE_EVICT_OTHER 0 /* Not evicting for various reasons */
diff --git a/src/third_party/wiredtiger/src/include/btree.h b/src/third_party/wiredtiger/src/include/btree.h
index a392f646bf7..ababd9d65cb 100644
--- a/src/third_party/wiredtiger/src/include/btree.h
+++ b/src/third_party/wiredtiger/src/include/btree.h
@@ -54,7 +54,7 @@
#define WT_BTREE_MAX_ADDR_COOKIE 255 /* Maximum address cookie */
/* Evict pages if we see this many consecutive deleted records. */
-#define WT_BTREE_DELETE_THRESHOLD 1000
+#define WT_BTREE_DELETE_THRESHOLD WT_THOUSAND
/*
* Minimum size of the chunks (in percentage of the page size) a page gets split into during
@@ -130,7 +130,7 @@ struct __wt_btree {
bool prefix_compression; /* Prefix compression */
u_int prefix_compression_min; /* Prefix compression min */
-#define WT_SPLIT_DEEPEN_MIN_CHILD_DEF 10000
+#define WT_SPLIT_DEEPEN_MIN_CHILD_DEF (10 * WT_THOUSAND)
u_int split_deepen_min_child; /* Minimum entries to deepen tree */
#define WT_SPLIT_DEEPEN_PER_CHILD_DEF 100
u_int split_deepen_per_child; /* Entries per child when deepened */
diff --git a/src/third_party/wiredtiger/src/include/cache.h b/src/third_party/wiredtiger/src/include/cache.h
index 4a8faf6a93f..a1eefce9dbf 100644
--- a/src/third_party/wiredtiger/src/include/cache.h
+++ b/src/third_party/wiredtiger/src/include/cache.h
@@ -16,9 +16,9 @@
* Tuning constants: I hesitate to call this tuning, but we want to review some number of pages from
* each file's in-memory tree for each page we evict.
*/
-#define WT_EVICT_MAX_TREES 1000 /* Maximum walk points */
-#define WT_EVICT_WALK_BASE 300 /* Pages tracked across file visits */
-#define WT_EVICT_WALK_INCR 100 /* Pages added each walk */
+#define WT_EVICT_MAX_TREES WT_THOUSAND /* Maximum walk points */
+#define WT_EVICT_WALK_BASE 300 /* Pages tracked across file visits */
+#define WT_EVICT_WALK_INCR 100 /* Pages added each walk */
/*
* WT_EVICT_ENTRY --
diff --git a/src/third_party/wiredtiger/src/include/misc_inline.h b/src/third_party/wiredtiger/src/include/misc_inline.h
index 5ae0b8bd46e..d5e8e8812fa 100644
--- a/src/third_party/wiredtiger/src/include/misc_inline.h
+++ b/src/third_party/wiredtiger/src/include/misc_inline.h
@@ -251,9 +251,9 @@ __wt_failpoint(WT_SESSION_IMPL *session, uint64_t conn_flag, u_int probability)
return (false);
/* Assert that the given probability is sane. */
- WT_ASSERT(session, probability <= 10000);
+ WT_ASSERT(session, probability <= 10 * WT_THOUSAND);
- return (__wt_random(&session->rnd) % 10000 <= probability);
+ return (__wt_random(&session->rnd) % (10 * WT_THOUSAND) <= probability);
}
/*
diff --git a/src/third_party/wiredtiger/src/include/mutex_inline.h b/src/third_party/wiredtiger/src/include/mutex_inline.h
index 768d9d1ed22..8fab4d84628 100644
--- a/src/third_party/wiredtiger/src/include/mutex_inline.h
+++ b/src/third_party/wiredtiger/src/include/mutex_inline.h
@@ -197,7 +197,7 @@ __wt_spin_init(WT_SESSION_IMPL *session, WT_SPINLOCK *t, const char *name)
{
DWORD windows_error;
- if (InitializeCriticalSectionAndSpinCount(&t->lock, 4000) == 0) {
+ if (InitializeCriticalSectionAndSpinCount(&t->lock, 4 * WT_THOUSAND) == 0) {
windows_error = __wt_getlasterror();
__wt_errx(session, "%s: InitializeCriticalSectionAndSpinCount: %s", name,
__wt_formatmessage(session, windows_error));
diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h
index 94f9b073396..8650e195bad 100644
--- a/src/third_party/wiredtiger/src/include/stat.h
+++ b/src/third_party/wiredtiger/src/include/stat.h
@@ -287,7 +287,7 @@ __wt_stats_clear(void *stats_arg, int slot)
WT_STAT_CONN_INCR(session, stat##_lt250); \
else if (msecs < 500) \
WT_STAT_CONN_INCR(session, stat##_lt500); \
- else if (msecs < 1000) \
+ else if (msecs < WT_THOUSAND) \
WT_STAT_CONN_INCR(session, stat##_lt1000); \
else \
WT_STAT_CONN_INCR(session, stat##_gt1000); \
@@ -302,9 +302,9 @@ __wt_stats_clear(void *stats_arg, int slot)
WT_STAT_CONN_INCR(session, stat##_lt250); \
else if (usecs < 500) \
WT_STAT_CONN_INCR(session, stat##_lt500); \
- else if (usecs < 1000) \
+ else if (usecs < WT_THOUSAND) \
WT_STAT_CONN_INCR(session, stat##_lt1000); \
- else if (usecs < 10000) \
+ else if (usecs < 10 * WT_THOUSAND) \
WT_STAT_CONN_INCR(session, stat##_lt10000); \
else \
WT_STAT_CONN_INCR(session, stat##_gt10000); \
diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c
index 4e41debea52..9c399a535e3 100644
--- a/src/third_party/wiredtiger/src/log/log.c
+++ b/src/third_party/wiredtiger/src/log/log.c
@@ -359,7 +359,7 @@ __wt_log_force_sync(WT_SESSION_IMPL *session, WT_LSN *min_lsn)
*/
while (log->sync_lsn.l.file < min_lsn->l.file) {
__wt_cond_signal(session, S2C(session)->log_file_cond);
- __wt_cond_wait(session, log->log_sync_cond, 10000, NULL);
+ __wt_cond_wait(session, log->log_sync_cond, 10 * WT_THOUSAND, NULL);
}
__wt_spin_lock(session, &log->log_sync_lock);
@@ -1977,7 +1977,7 @@ __wt_log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, bool *freep)
*/
if (log->sync_lsn.l.file < slot->slot_end_lsn.l.file ||
__wt_spin_trylock(session, &log->log_sync_lock) != 0) {
- __wt_cond_wait(session, log->log_sync_cond, 10000, NULL);
+ __wt_cond_wait(session, log->log_sync_cond, 10 * WT_THOUSAND, NULL);
continue;
}
locked = true;
@@ -2702,11 +2702,11 @@ __log_write_internal(WT_SESSION_IMPL *session, WT_ITEM *record, WT_LSN *lsnp, ui
if (LF_ISSET(WT_LOG_FLUSH)) {
/* Wait for our writes to reach the OS */
while (__wt_log_cmp(&log->write_lsn, &lsn) <= 0 && myslot.slot->slot_error == 0)
- __wt_cond_wait(session, log->log_write_cond, 10000, NULL);
+ __wt_cond_wait(session, log->log_write_cond, 10 * WT_THOUSAND, NULL);
} else if (LF_ISSET(WT_LOG_FSYNC)) {
/* Wait for our writes to reach disk */
while (__wt_log_cmp(&log->sync_lsn, &lsn) <= 0 && myslot.slot->slot_error == 0)
- __wt_cond_wait(session, log->log_sync_cond, 10000, NULL);
+ __wt_cond_wait(session, log->log_sync_cond, 10 * WT_THOUSAND, NULL);
}
err:
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_manager.c b/src/third_party/wiredtiger/src/lsm/lsm_manager.c
index 6ef59a46a94..30c8cd66a3e 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_manager.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_manager.c
@@ -352,7 +352,7 @@ __lsm_manager_run_server(WT_SESSION_IMPL *session)
dhandle_locked = false;
while (FLD_ISSET(conn->server_flags, WT_CONN_SERVER_LSM)) {
- __wt_sleep(0, 10000);
+ __wt_sleep(0, 10 * WT_THOUSAND);
if (TAILQ_EMPTY(&conn->lsmqh))
continue;
__wt_readlock(session, &conn->dhandle_lock);
@@ -373,7 +373,7 @@ __lsm_manager_run_server(WT_SESSION_IMPL *session)
idlems = WT_TIMEDIFF_MS(now, lsm_tree->last_active);
fillms = 3 * lsm_tree->chunk_fill_ms;
if (fillms == 0)
- fillms = 10000;
+ fillms = 10 * WT_THOUSAND;
/*
* If the tree appears to not be triggering enough LSM maintenance, help it out. Some
* types of additional work units don't hurt, and can be necessary if some work units
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_merge.c b/src/third_party/wiredtiger/src/lsm/lsm_merge.c
index c9c0c44c9b3..d17168c8754 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_merge.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_merge.c
@@ -91,8 +91,8 @@ __lsm_merge_aggressive_update(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree)
/*
* If there is no estimate for how long it's taking to fill chunks pick 10 seconds.
*/
- msec_to_create_merge =
- lsm_tree->merge_min * (lsm_tree->chunk_fill_ms == 0 ? 10000 : lsm_tree->chunk_fill_ms);
+ msec_to_create_merge = lsm_tree->merge_min *
+ (lsm_tree->chunk_fill_ms == 0 ? (10 * WT_THOUSAND) : lsm_tree->chunk_fill_ms);
/*
* Don't consider getting aggressive until enough time has passed that we should have created
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_worker.c b/src/third_party/wiredtiger/src/lsm/lsm_worker.c
index a229107479a..165912e531e 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_worker.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_worker.c
@@ -156,7 +156,7 @@ __lsm_worker(void *arg)
/* Don't busy wait if there was any work to do. */
if (!progress) {
- __wt_cond_wait(session, cookie->work_cond, 10000, NULL);
+ __wt_cond_wait(session, cookie->work_cond, 10 * WT_THOUSAND, NULL);
continue;
}
}
diff --git a/src/third_party/wiredtiger/src/meta/meta_table.c b/src/third_party/wiredtiger/src/meta/meta_table.c
index 5d0be5ac3ee..54d90ca0aba 100644
--- a/src/third_party/wiredtiger/src/meta/meta_table.c
+++ b/src/third_party/wiredtiger/src/meta/meta_table.c
@@ -73,7 +73,7 @@ __wt_metadata_cursor_open(WT_SESSION_IMPL *session, const char *config, WT_CURSO
*/
btree = CUR2BT(*cursorp);
-#define WT_EVICT_META_SKEW 10000
+#define WT_EVICT_META_SKEW (10 * WT_THOUSAND)
/*
* Skew eviction so metadata almost always stays in cache.
*
diff --git a/src/third_party/wiredtiger/src/os_win/os_fs.c b/src/third_party/wiredtiger/src/os_win/os_fs.c
index 919d124bf3c..c31da07f345 100644
--- a/src/third_party/wiredtiger/src/os_win/os_fs.c
+++ b/src/third_party/wiredtiger/src/os_win/os_fs.c
@@ -23,7 +23,7 @@
" It will attempt a few more times. You should confirm" \
" no other processes, such as virus scanners, are" \
" accessing the WiredTiger files"); \
- __wt_sleep(0L, 50000L); \
+ __wt_sleep(0L, 50L * WT_THOUSAND); \
continue; \
} \
} \
diff --git a/src/third_party/wiredtiger/src/os_win/os_time.c b/src/third_party/wiredtiger/src/os_win/os_time.c
index 29350f05764..4c5c6156cc4 100644
--- a/src/third_party/wiredtiger/src/os_win/os_time.c
+++ b/src/third_party/wiredtiger/src/os_win/os_time.c
@@ -23,8 +23,8 @@ __wt_epoch_raw(WT_SESSION_IMPL *session, struct timespec *tsp)
GetSystemTimeAsFileTime(&time);
ns100 = (((int64_t)time.dwHighDateTime << 32) + time.dwLowDateTime) - 116444736000000000LL;
- tsp->tv_sec = ns100 / 10000000;
- tsp->tv_nsec = (long)((ns100 % 10000000) * 100);
+ tsp->tv_sec = ns100 / (10 * WT_MILLION);
+ tsp->tv_nsec = (long)((ns100 % (10 * WT_MILLION)) * 100);
}
/*
diff --git a/src/third_party/wiredtiger/src/support/hazard.c b/src/third_party/wiredtiger/src/support/hazard.c
index b6bacedf9ef..8d51ccb6b15 100644
--- a/src/third_party/wiredtiger/src/support/hazard.c
+++ b/src/third_party/wiredtiger/src/support/hazard.c
@@ -388,7 +388,7 @@ __wt_hazard_check_assert(WT_SESSION_IMPL *session, void *ref, bool waitfor)
return (true);
if (!waitfor || ++i > 100)
break;
- __wt_sleep(0, 10000);
+ __wt_sleep(0, 10 * WT_THOUSAND);
}
__wt_errx(session,
"hazard pointer reference to discarded object: (%p: session %p name %s: %s, line %d)",
diff --git a/src/third_party/wiredtiger/src/support/mtx_rw.c b/src/third_party/wiredtiger/src/support/mtx_rw.c
index a2262172d77..27cde21e790 100644
--- a/src/third_party/wiredtiger/src/support/mtx_rw.c
+++ b/src/third_party/wiredtiger/src/support/mtx_rw.c
@@ -231,7 +231,7 @@ stall:
/* Wait for our group to start. */
time_start = l->stat_read_count_off != -1 && WT_STAT_ENABLED(session) ? __wt_clock(session) : 0;
for (pause_cnt = 0; ticket != l->u.s.current; pause_cnt++) {
- if (pause_cnt < 1000)
+ if (pause_cnt < WT_THOUSAND)
WT_PAUSE();
else if (pause_cnt < 1200)
__wt_yield();
@@ -397,7 +397,7 @@ __wt_writelock(WT_SESSION_IMPL *session, WT_RWLOCK *l)
l->stat_write_count_off != -1 && WT_STAT_ENABLED(session) ? __wt_clock(session) : 0;
for (pause_cnt = 0, old.u.v = l->u.v; ticket != old.u.s.current || old.u.s.readers_active != 0;
pause_cnt++, old.u.v = l->u.v) {
- if (pause_cnt < 1000)
+ if (pause_cnt < WT_THOUSAND)
WT_PAUSE();
else if (pause_cnt < 1200)
__wt_yield();
diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c
index 76801b2d80a..428422db3a5 100644
--- a/src/third_party/wiredtiger/src/txn/txn.c
+++ b/src/third_party/wiredtiger/src/txn/txn.c
@@ -488,8 +488,8 @@ __wt_txn_update_oldest(WT_SESSION_IMPL *session, uint32_t flags)
/* Output a verbose message about long-running transactions,
* but only when some progress is being made. */
- if (WT_VERBOSE_ISSET(session, WT_VERB_TRANSACTION) && current_id - oldest_id > 10000 &&
- oldest_session != NULL) {
+ if (WT_VERBOSE_ISSET(session, WT_VERB_TRANSACTION) &&
+ current_id - oldest_id > (10 * WT_THOUSAND) && oldest_session != NULL) {
__wt_verbose(session, WT_VERB_TRANSACTION,
"old snapshot %" PRIu64 " pinned in session %" PRIu32 " [%s] with snap_min %" PRIu64,
oldest_id, oldest_session->id, oldest_session->lastop, oldest_session->txn->snap_min);
diff --git a/src/third_party/wiredtiger/test/bloom/test_bloom.c b/src/third_party/wiredtiger/test/bloom/test_bloom.c
index a090fa0eec6..ece681a4a37 100644
--- a/src/third_party/wiredtiger/test/bloom/test_bloom.c
+++ b/src/third_party/wiredtiger/test/bloom/test_bloom.c
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
/* Set default configuration values. */
g.c_cache = 10;
- g.c_ops = 100000;
+ g.c_ops = 100 * WT_THOUSAND;
g.c_key_max = 100;
g.c_k = 8;
g.c_factor = 16;
diff --git a/src/third_party/wiredtiger/test/checkpoint/checkpointer.c b/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
index 5a2e2978658..aed235cb100 100644
--- a/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
+++ b/src/third_party/wiredtiger/test/checkpoint/checkpointer.c
@@ -127,7 +127,7 @@ clock_thread(void *arg)
* Random value between 5000 and 10000.
*/
delay = __wt_random(&rnd) % 5001;
- __wt_sleep(0, delay + 5000);
+ __wt_sleep(0, delay + 5 * WT_THOUSAND);
}
testutil_check(wt_session->close(wt_session, NULL));
diff --git a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c
index 61f8d4e9d4f..242660a068e 100644
--- a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c
+++ b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c
@@ -63,8 +63,8 @@ main(int argc, char *argv[])
g.checkpoint_name = "WiredTigerCheckpoint";
g.debug_mode = false;
g.home = dmalloc(512);
- g.nkeys = 10000;
- g.nops = 100000;
+ g.nkeys = 10 * WT_THOUSAND;
+ g.nops = 100 * WT_THOUSAND;
g.ntables = 3;
g.nworkers = 1;
g.evict_reposition_timing_stress = false;
diff --git a/src/third_party/wiredtiger/test/checkpoint/workers.c b/src/third_party/wiredtiger/test/checkpoint/workers.c
index 76a209ce25f..69fa646616c 100644
--- a/src/third_party/wiredtiger/test/checkpoint/workers.c
+++ b/src/third_party/wiredtiger/test/checkpoint/workers.c
@@ -392,7 +392,7 @@ real_worker(void)
}
for (i = 0; i < g.nops && g.opts.running; ++i, __wt_yield()) {
- if (i > 0 && i % 5000 == 0)
+ if (i > 0 && i % (5 * WT_THOUSAND) == 0)
printf("Worker %u of %u ops\n", i, g.nops);
if (start_txn) {
if ((ret = session->begin_transaction(session, begin_cfg)) != 0) {
diff --git a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
index 39257050116..19b190b3707 100644
--- a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
+++ b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c
@@ -40,7 +40,7 @@
#define MAX_NTABLES 100
#define MAX_KEY_SIZE 100
-#define MAX_VALUE_SIZE 10000
+#define MAX_VALUE_SIZE (10 * WT_THOUSAND)
#define MAX_MODIFY_ENTRIES 10
#define MAX_MODIFY_DIFF 500
@@ -130,7 +130,7 @@ typedef enum { INSERT, MODIFY, REMOVE, UPDATE, _OPERATION_TYPE_COUNT } OPERATION
* Having a predictable cycle makes it easy on the checking side (knowing how many total changes
* have been made) to check the state of the table.
*/
-#define KEYS_PER_TABLE 10000
+#define KEYS_PER_TABLE (10 * WT_THOUSAND)
#define CHANGES_PER_CYCLE (KEYS_PER_TABLE * _OPERATION_TYPE_COUNT)
/*
@@ -380,7 +380,7 @@ table_changes(WT_SESSION *session, TABLE *table)
if (__wt_random(&table->rand) % 2 == 0) {
value = dcalloc(1, table->max_value_size);
value2 = dcalloc(1, table->max_value_size);
- nrecords = __wt_random(&table->rand) % 1000;
+ nrecords = __wt_random(&table->rand) % WT_THOUSAND;
VERBOSE(4, "changing %" PRIu32 " records in %s\n", nrecords, table->name);
testutil_check(session->open_cursor(session, table->name, NULL, NULL, &cur));
for (i = 0; i < nrecords; i++) {
@@ -767,7 +767,7 @@ check_table(WT_SESSION *session, TABLE *table)
else if (op_type == UPDATE || (op_type == MODIFY && change_count < boundary))
change_count += KEYS_PER_TABLE;
else if (op_type == MODIFY || (op_type == REMOVE && change_count < boundary))
- change_count += 20000;
+ change_count += 20 * WT_THOUSAND;
else
testutil_assert(false);
key_value(change_count, key, sizeof(key), &item, &op_type);
@@ -894,9 +894,9 @@ main(int argc, char *argv[])
if (rough_size == 0)
file_max = 100 + __wt_random(&rnd) % 100; /* small log files, min 100K */
else if (rough_size == 1)
- file_max = 200 + __wt_random(&rnd) % 1000; /* 200K to ~1M */
+ file_max = 200 + __wt_random(&rnd) % WT_THOUSAND; /* 200K to ~1M */
else
- file_max = 1000 + __wt_random(&rnd) % 20000; /* 1M to ~20M */
+ file_max = WT_THOUSAND + __wt_random(&rnd) % (20 * WT_THOUSAND); /* 1M to ~20M */
testutil_check(
__wt_snprintf(conf, sizeof(conf), "%s,create,%s,log=(enabled=true,file_max=%" PRIu32 "K)",
CONN_CONFIG_COMMON, backup_verbose, file_max));
diff --git a/src/third_party/wiredtiger/test/csuite/random_abort/main.c b/src/third_party/wiredtiger/test/csuite/random_abort/main.c
index ff06a4bb6bc..819523413ae 100644
--- a/src/third_party/wiredtiger/test/csuite/random_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/random_abort/main.c
@@ -226,7 +226,7 @@ thread_run(void *arg)
/*
* If configured, run compaction on database after each epoch of 100000 operations.
*/
- if (compaction && i >= 100000 && i % 100000 == 0) {
+ if (compaction && i >= (100 * WT_THOUSAND) && i % (100 * WT_THOUSAND) == 0) {
printf("Running compaction in Thread %" PRIu32 "\n", td->id);
if (columnar_table)
testutil_check(session->compact(session, col_uri, NULL));
diff --git a/src/third_party/wiredtiger/test/csuite/random_directio/main.c b/src/third_party/wiredtiger/test/csuite/random_directio/main.c
index 7e39b504967..8fa310f3667 100644
--- a/src/third_party/wiredtiger/test/csuite/random_directio/main.c
+++ b/src/third_party/wiredtiger/test/csuite/random_directio/main.c
@@ -554,7 +554,7 @@ thread_run(void *arg)
for (i = 0;; ++i) {
again:
/*
- if (i > 0 && i % 10000 == 0)
+ if (i > 0 && i % (10 * WT_THOUSAND) == 0)
printf("Thread %" PRIu32
" completed %" PRIu64 " entries\n",
td->id, i);
@@ -569,7 +569,7 @@ again:
* Every 1000th record write a very large value that exceeds the log buffer size. This
* forces us to use the unbuffered path.
*/
- if (i % 1000 == 0) {
+ if (i % WT_THOUSAND == 0) {
cursor->set_value(cursor, large);
} else {
cursor->set_value(cursor, buf2);
@@ -957,7 +957,7 @@ check_db(uint32_t nth, uint32_t datasize, pid_t pid, bool directio, uint32_t fla
* thread id, so they are interleaved. Once we have the neighborhood where some keys may be missing,
* we'll back up to do a scan from that point.
*/
-#define CHECK_INCR 1000
+#define CHECK_INCR WT_THOUSAND
for (id = 0;; id += CHECK_INCR) {
gen_kv(keybuf, kvsize, id, 0, large_arr[0], true);
cursor->set_key(cursor, keybuf);
@@ -1036,7 +1036,7 @@ check_db(uint32_t nth, uint32_t datasize, pid_t pid, bool directio, uint32_t fla
/*
* Every 1000th record is large.
*/
- if (id % 1000 == 0)
+ if (id % WT_THOUSAND == 0)
TEST_STREQ(large_arr[th], gotvalue, "main table large value");
else
TEST_STREQ(&keybuf[kvsize], gotvalue, "main table value");
diff --git a/src/third_party/wiredtiger/test/csuite/rwlock/main.c b/src/third_party/wiredtiger/test/csuite/rwlock/main.c
index 7dabeff7ddc..4d32cdaff8b 100644
--- a/src/third_party/wiredtiger/test/csuite/rwlock/main.c
+++ b/src/third_party/wiredtiger/test/csuite/rwlock/main.c
@@ -30,8 +30,8 @@
/*
* JIRA ticket reference: HELP-4355 Test rwlock collapse under load.
*/
-#define MAX_THREADS 1000
-#define READS_PER_WRITE 10000
+#define MAX_THREADS WT_THOUSAND
+#define READS_PER_WRITE (10 * WT_THOUSAND)
#define CHECK_CORRECTNESS 1
@@ -58,7 +58,7 @@ main(int argc, char *argv[])
opts = &_opts;
memset(opts, 0, sizeof(*opts));
opts->nthreads = 100;
- opts->nops = 1000000; /* per thread */
+ opts->nops = WT_MILLION; /* per thread */
testutil_check(testutil_parse_opts(argc, argv, opts));
running = true;
@@ -148,7 +148,7 @@ thread_rwlock(void *arg)
__wt_readunlock(session, &rwlock);
#endif
- if (opts->verbose && i % 10000 == 0) {
+ if (opts->verbose && i % (10 * WT_THOUSAND) == 0) {
printf("%s", session->id == 20 ? ".\n" : ".");
fflush(stdout);
}
diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
index 9bc9a570cb3..51f856cdf92 100644
--- a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
@@ -511,7 +511,7 @@ thread_ts_run(void *arg)
}
} else
ts_wait:
- __wt_sleep(0, 1000);
+ __wt_sleep(0, WT_THOUSAND);
}
/* NOTREACHED */
}
diff --git a/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c b/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c
index dae2aeb9799..510ae7cc454 100644
--- a/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c
@@ -168,7 +168,7 @@ thread_ts_run(void *arg)
testutil_check(conn->open_session(conn, NULL, NULL, &session));
/* Update the oldest/stable timestamps every 1 millisecond. */
- for (last_ts = 0;; __wt_sleep(0, 1000)) {
+ for (last_ts = 0;; __wt_sleep(0, WT_THOUSAND)) {
/* Get the last committed timestamp periodically in order to update the oldest timestamp. */
ts = maximum_stable_ts(active_timestamps, nth);
if (ts == last_ts)
diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
index ccdbe14855f..5d4a3a1624c 100644
--- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
@@ -71,7 +71,7 @@ static char home[1024]; /* Program working dir */
/* Include worker threads and prepare extra sessions */
#define SESSION_MAX (MAX_TH + 3 + MAX_TH * PREPARE_PCT)
#define STAT_WAIT 1
-#define USEC_STAT 10000
+#define USEC_STAT (10 * WT_THOUSAND)
static const char *table_pfx = "table";
static const char *const uri_collection = "collection";
@@ -281,7 +281,7 @@ thread_ts_run(void *arg)
__wt_seconds((WT_SESSION_IMPL *)session, &last_reconfig);
/* Update the oldest/stable timestamps every 1 millisecond. */
- for (last_ts = 0;; __wt_sleep(0, 1000)) {
+ for (last_ts = 0;; __wt_sleep(0, WT_THOUSAND)) {
/* Get the last committed timestamp periodically in order to update the oldest
* timestamp. */
ts = maximum_stable_ts(active_timestamps, nth);
diff --git a/src/third_party/wiredtiger/test/csuite/truncated_log/main.c b/src/third_party/wiredtiger/test/csuite/truncated_log/main.c
index 5774ff17d23..fedf007cdf3 100644
--- a/src/third_party/wiredtiger/test/csuite/truncated_log/main.c
+++ b/src/third_party/wiredtiger/test/csuite/truncated_log/main.c
@@ -177,7 +177,7 @@ fill_db(void)
* and file creation records. Then subtract out a few more records to be conservative.
*/
units = (K_SIZE + V_SIZE) / 128 + 1;
- min_key = 90000 / (units * 128) - 15;
+ min_key = (90 * WT_THOUSAND) / (units * 128) - 15;
max_key = min_key * 2;
first = true;
for (i = 0; i < max_key; ++i) {
diff --git a/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c b/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c
index e54cb7ca813..f085e5c5cdc 100644
--- a/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c
@@ -88,7 +88,7 @@ thread_func(void *arg)
++g_ts;
/* 5K updates/sec */
- (void)usleep(1000000ULL * NR_THREADS / 5000);
+ (void)usleep(1ULL * WT_MILLION * NR_THREADS / (5 * WT_THOUSAND));
}
}
diff --git a/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c b/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c
index d3a16858691..d44f252f144 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c
@@ -38,8 +38,6 @@
/* Don't move into shared function there is a cross platform solution */
#include <signal.h>
-#define MILLION 1000000
-
/* Needs to be global for signal handling. */
static TEST_OPTS *opts, _opts;
@@ -147,7 +145,7 @@ main(int argc, char *argv[])
testutil_check(__wt_thread_join(NULL, &idlist[i]));
ce = clock();
- printf("%" PRIu64 "M records: %.2lf processor seconds\n", opts->max_inserted_id / MILLION,
+ printf("%" PRIu64 "M records: %.2lf processor seconds\n", opts->max_inserted_id / WT_MILLION,
(ce - cs) / (double)CLOCKS_PER_SEC);
testutil_cleanup(opts);
diff --git a/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c b/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c
index 340c7c7672d..4ea4f85c414 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c
@@ -52,8 +52,8 @@
* of inserts set low as a default.
*/
-#define N_RECORDS 10000
-#define N_INSERT 500000
+#define N_RECORDS (10 * WT_THOUSAND)
+#define N_INSERT (500 * WT_THOUSAND)
#define N_INSERT_THREAD 2
#define N_JOIN_THREAD 2
#define S64 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789::"
@@ -272,12 +272,12 @@ thread_insert(void *arg)
if (__wt_random(&rnd) % 2 == 0)
post = 54321;
else
- post = i % 100000;
+ post = i % (100 * WT_THOUSAND);
if (__wt_random(&rnd) % 2 == 0) {
bal = -100;
flag = 1;
} else {
- bal = 1 + (i % 1000) * 100;
+ bal = 1 + (i % WT_THOUSAND) * 100;
flag = 0;
}
maincur->set_value(maincur, post, bal, extra, flag, key);
@@ -303,8 +303,8 @@ thread_insert(void *arg)
else
testutil_check(session->commit_transaction(session, NULL));
#endif
- if (i % 1000 == 0 && i != 0) {
- if (i % 10000 == 0)
+ if (i % WT_THOUSAND == 0 && i != 0) {
+ if (i % (10 * WT_THOUSAND) == 0)
fprintf(stderr, "*");
else
fprintf(stderr, ".");
diff --git a/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c b/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c
index 1ff40ed754f..7a4e1870445 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c
@@ -29,7 +29,7 @@
#include "test_util.h"
static const char name[] = "lsm:test";
-#define NUM_DOCS 100000
+#define NUM_DOCS (100 * WT_THOUSAND)
#define NUM_QUERIES (NUM_DOCS / 100)
/*
diff --git a/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c b/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c
index a5724680703..0d1fed07ba5 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c
@@ -49,7 +49,7 @@
* table.
*/
-#define N_RECORDS 10000
+#define N_RECORDS (10 * WT_THOUSAND)
/*
* get_stat_total --
diff --git a/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c b/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c
index 3baa220b79d..3c0f5d88f83 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c
@@ -99,7 +99,7 @@ main(int argc, char *argv[])
opts = &_opts;
memset(opts, 0, sizeof(*opts));
opts->nthreads = 20;
- opts->nrecords = 100000;
+ opts->nrecords = 100 * WT_THOUSAND;
opts->table_type = TABLE_ROW;
testutil_check(testutil_parse_opts(argc, argv, opts));
testutil_make_work_dir(opts->home);
@@ -194,12 +194,12 @@ thread_insert_race(void *arg)
printf("Error in update: %d\n", ret);
}
testutil_check(session->commit_transaction(session, NULL));
- if (i % 10000 == 0) {
+ if (i % (10 * WT_THOUSAND) == 0) {
printf("insert: %" PRIu64 "\r", i);
fflush(stdout);
}
}
- if (i > 10000)
+ if (i > 10 * WT_THOUSAND)
printf("\n");
opts->running = false;
diff --git a/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c b/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c
index ec82fca3a69..2df2873e5d4 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c
@@ -123,7 +123,7 @@ main(int argc, char *argv[])
/*
* Checksums of power-of-two data chunks.
*/
- for (i = 0, len = 512; i < 1000; ++i) {
+ for (i = 0, len = 512; i < WT_THOUSAND; ++i) {
for (j = 0; j < len; ++j)
data[j] = __wt_random(&rnd) & 0xff;
hw = __wt_checksum(data, len);
@@ -138,7 +138,7 @@ main(int argc, char *argv[])
/*
* Checksums of random data chunks.
*/
- for (i = 0; i < 1000; ++i) {
+ for (i = 0; i < WT_THOUSAND; ++i) {
len = __wt_random(&rnd) % DATASIZE;
for (j = 0; j < len; ++j)
data[j] = __wt_random(&rnd) & 0xff;
diff --git a/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c b/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c
index 6099644bf78..4d9d810050b 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c
@@ -39,8 +39,8 @@
*
* Failure mode: We get results back from our join.
*/
-#define N_RECORDS 100000
-#define N_INSERT 1000000
+#define N_RECORDS (100 * WT_THOUSAND)
+#define N_INSERT WT_MILLION
void populate(TEST_OPTS *opts);
@@ -179,7 +179,7 @@ populate(TEST_OPTS *opts)
if (__wt_random(&rnd) % 11 == 0)
post = 54321;
else
- post = i % 100000;
+ post = i % (100 * WT_THOUSAND);
if (__wt_random(&rnd) % 4 == 0) {
balance = -100;
flag = 1;
diff --git a/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c b/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c
index 3a9c02ee1a8..935cf409bde 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c
@@ -71,12 +71,12 @@
#define BIG_SIZE (1024 * 10)
#define BIG_CONTENTS "<Big String Contents>"
#define MAX_ARGS 20
-#define MAX_OP_RANGE 1000
+#define MAX_OP_RANGE WT_THOUSAND
#define STDERR_FILE "stderr.txt"
#define STDOUT_FILE "stdout.txt"
#define TESTS_PER_CALIBRATION 2
#define TESTS_WITH_RECALIBRATION 5
-#define VERBOSE_PRINT 10000
+#define VERBOSE_PRINT (10 * WT_THOUSAND)
static int check_results(TEST_OPTS *, uint64_t *);
static void check_values(WT_CURSOR *, int, int, int, char *);
@@ -625,7 +625,7 @@ subtest_populate(TEST_OPTS *opts, bool close_test)
printf(" %" PRIu64 "/%" PRIu64 "\n", (i + 1), nrecords);
/* Attempt to isolate the failures to checkpointing. */
if (i == (nrecords / 100)) {
- enable_failures(opts->nops, 1000000);
+ enable_failures(opts->nops, WT_MILLION);
/* CHECK should expect failures. */
CHECK(session->checkpoint(session, NULL), true);
disable_failures();
@@ -674,7 +674,7 @@ main(int argc, char *argv[])
argc -= __wt_optind;
argv += __wt_optind;
if (opts->nrecords == 0)
- opts->nrecords = 50000;
+ opts->nrecords = 50 * WT_THOUSAND;
if (opts->table_type == TABLE_FIX)
testutil_die(ENOTSUP, "Fixed-length column store not supported");
diff --git a/src/third_party/wiredtiger/test/csuite/wt2999_join_extractor/main.c b/src/third_party/wiredtiger/test/csuite/wt2999_join_extractor/main.c
index 0de3dda9fbc..2f88aeca86d 100644
--- a/src/third_party/wiredtiger/test/csuite/wt2999_join_extractor/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt2999_join_extractor/main.c
@@ -131,7 +131,7 @@ main(int argc, char *argv[])
key = 10;
val[0] = 20;
val[1] = 30;
- for (i = 0; i < 100000; ++i) {
+ for (i = 0; i < 100 * WT_THOUSAND; ++i) {
key += i;
val[0] += i;
val[1] += i;
diff --git a/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c b/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c
index 9317379ce64..7d9129491b2 100644
--- a/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c
@@ -185,13 +185,13 @@ modify_run(TEST_OPTS *opts)
cursor->value_format = "u";
memset(&modtmp, 0, sizeof(modtmp));
-#define NRUNS 10000
+#define NRUNS (10 * WT_THOUSAND)
for (i = 0; i < NRUNS; ++i) {
/* Create an initial value. */
len = (size_t)(__wt_random(&rnd) % MAX_REPL_BYTES);
testutil_check(__wt_buf_set(session, localA, modify_repl, len));
- for (j = 0; j < 1000; ++j) {
+ for (j = 0; j < WT_THOUSAND; ++j) {
/* Make lower case so modifications are easy to see. */
for (p = localA->mem; WT_PTRDIFF(p, localA->mem) < localA->size; p++)
*p = __wt_tolower(*p);
diff --git a/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c b/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c
index f30ba212104..abe2b578be4 100644
--- a/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c
@@ -29,7 +29,7 @@
#include <signal.h>
-#define MAXKEY 10000
+#define MAXKEY (10 * WT_THOUSAND)
#define PERIOD 60
#define HOME_LEN 256
diff --git a/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c b/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c
index b9e2137746c..a483afc3e1d 100644
--- a/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c
@@ -44,7 +44,7 @@ main(int argc, char *argv[])
WT_CURSOR *c;
WT_SESSION *session;
char *jsonkey, *jsonvalue;
- char projection[1000];
+ char projection[WT_THOUSAND];
opts = &_opts;
memset(opts, 0, sizeof(*opts));
diff --git a/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c b/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c
index 88b62a5994d..90e0fe59969 100644
--- a/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c
@@ -37,7 +37,7 @@
* expecting to and vice versa.
*/
-#define NUM_KEYS 2000
+#define NUM_KEYS (2 * WT_THOUSAND)
/*
* This is a global flag that should be set before running test_hs_workload. It lets the child
diff --git a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c
index cc240fe1453..5cf4c3ffb10 100644
--- a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c
@@ -52,7 +52,7 @@ static bool use_columns = false;
#define ROW_KEY_FORMAT ("%010" PRIu64)
#define MAX_CKPT_INVL 5 /* Maximum interval between checkpoints */
-#define MAX_DATA 1000
+#define MAX_DATA WT_THOUSAND
#define MAX_TIME 40
#define MIN_TIME 10
diff --git a/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c b/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c
index f8af119cd6c..9c99870f573 100644
--- a/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c
@@ -37,7 +37,7 @@
* with "verbose=[compact,compact_progress]". There's a chance these two cases are different.
*/
-#define NUM_RECORDS 1000000
+#define NUM_RECORDS WT_MILLION
#define CHECKPOINT_NUM 3
#define HOME_BUF_SIZE 512
#define STAT_BUF_SIZE 128
diff --git a/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c b/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c
index 79716d00090..ae8764955e7 100644
--- a/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c
@@ -37,7 +37,7 @@
* process and verifies that the data across two tables match after restart.
*/
-#define NUM_RECORDS 100000
+#define NUM_RECORDS (100 * WT_THOUSAND)
#define TIMEOUT 40
static bool compact_error;
diff --git a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c
index ab43a5415ba..2b6b0fd1583 100644
--- a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c
@@ -31,7 +31,7 @@
#define TIMEOUT 1
-#define NUM_RECORDS 800000
+#define NUM_RECORDS (800 * WT_THOUSAND)
/* Constants and variables declaration. */
/*
diff --git a/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c b/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c
index 8bd0a7e5cb8..64dd98dabc6 100644
--- a/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c
@@ -27,7 +27,7 @@
*/
#include <test_util.h>
-#define MAX_KEYS 100000
+#define MAX_KEYS (100 * WT_THOUSAND)
static const char *const conn_config =
"create,cache_size=100MB,log=(archive=false,enabled=true,file_max=100K),statistics=(all),"
diff --git a/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c b/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c
index be6bdbff3b4..1cf16c3a736 100644
--- a/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c
+++ b/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c
@@ -35,7 +35,7 @@
* suite does not allow overriding validation at the moment.
*/
-#define THREAD_NUM_ITERATIONS 200000
+#define THREAD_NUM_ITERATIONS (200 * WT_THOUSAND)
#define NUM_THREADS 110
#define KEY_MAX UINT32_MAX
#define TABLE_CONFIG_FMT "key_format=%s,value_format=%s,memory_page_image_max=50MB"
diff --git a/src/third_party/wiredtiger/test/cursor_order/cursor_order.c b/src/third_party/wiredtiger/test/cursor_order/cursor_order.c
index f9bd69b9acd..40eab342a14 100644
--- a/src/third_party/wiredtiger/test/cursor_order/cursor_order.c
+++ b/src/third_party/wiredtiger/test/cursor_order/cursor_order.c
@@ -66,9 +66,9 @@ main(int argc, char *argv[])
cfg->append_inserters = 1;
cfg->conn = NULL;
cfg->ftype = ROW;
- cfg->max_nops = 1000000;
+ cfg->max_nops = WT_MILLION;
cfg->multiple_files = false;
- cfg->nkeys = 1000;
+ cfg->nkeys = WT_THOUSAND;
cfg->reverse_scanners = 5;
cfg->reverse_scan_ops = 10;
cfg->thread_finish = false;
diff --git a/src/third_party/wiredtiger/test/fops/t.c b/src/third_party/wiredtiger/test/fops/t.c
index 6fff4b43a64..29c0edc67b1 100644
--- a/src/third_party/wiredtiger/test/fops/t.c
+++ b/src/third_party/wiredtiger/test/fops/t.c
@@ -75,7 +75,7 @@ main(int argc, char *argv[])
testutil_check(pthread_rwlock_init(&single, NULL));
- nops = 1000;
+ nops = WT_THOUSAND;
nthreads = 10;
runs = 1;
use_txn = false;
diff --git a/src/third_party/wiredtiger/test/format/bulk.c b/src/third_party/wiredtiger/test/format/bulk.c
index a88d3b3a9c4..a811b3866b0 100644
--- a/src/third_party/wiredtiger/test/format/bulk.c
+++ b/src/third_party/wiredtiger/test/format/bulk.c
@@ -194,7 +194,8 @@ table_load(TABLE *base, TABLE *table)
* When first starting up, report the progress for every 10 keys in the first 5K keys. After
* 5K records, report every 5K keys.
*/
- report_progress = (keyno < 5000 && keyno % 10 == 0) || keyno % 5000 == 0;
+ report_progress =
+ (keyno < (5 * WT_THOUSAND) && keyno % 10 == 0) || keyno % (5 * WT_THOUSAND) == 0;
/* Report on progress. */
if (report_progress)
track(track_buf, keyno);
diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h
index 183bd13707a..43f83943ca6 100644
--- a/src/third_party/wiredtiger/test/format/config.h
+++ b/src/third_party/wiredtiger/test/format/config.h
@@ -27,7 +27,7 @@ typedef struct {
u_int off; /* Value offset */
} CONFIG;
-#define V_MAX_TABLES_CONFIG 1000
+#define V_MAX_TABLES_CONFIG WT_THOUSAND
#define V_GLOBAL_ASSERT_READ_TIMESTAMP 0
#define V_GLOBAL_BACKUP 1
diff --git a/src/third_party/wiredtiger/test/format/config.sh b/src/third_party/wiredtiger/test/format/config.sh
index 3530f6bdc42..f28eac8090f 100755
--- a/src/third_party/wiredtiger/test/format/config.sh
+++ b/src/third_party/wiredtiger/test/format/config.sh
@@ -36,7 +36,7 @@ typedef struct {
u_int off; /* Value offset */
} CONFIG;
-#define V_MAX_TABLES_CONFIG 1000
+#define V_MAX_TABLES_CONFIG WT_THOUSAND
END_OF_HEADER_FILE_PREFIX
@@ -171,7 +171,7 @@ CONFIG configuration_list[] = {
{"format.independent_thread_rng", "configure independent thread RNG space", C_BOOL, 75, 0, 0}
-{"format.major_timeout", "long-running operations timeout (minutes)", C_IGNORE, 0, 0, 1000}
+{"format.major_timeout", "long-running operations timeout (minutes)", C_IGNORE, 0, 0, WT_THOUSAND}
/*
* 0%
@@ -184,7 +184,7 @@ CONFIG configuration_list[] = {
{"logging.compression", "logging compression (off | lz4 | snappy | zlib | zstd)", C_IGNORE | C_STRING, 0, 0, 0}
-{"logging.file_max", "maximum log file size (KB)", 0x0, 100, 512000, 2097152}
+{"logging.file_max", "maximum log file size (KB)", 0x0, 100, 512 * WT_THOUSAND, 2097152}
{"logging.prealloc", "configure log file pre-allocation", C_BOOL, 50, 0, 0}
@@ -194,7 +194,7 @@ CONFIG configuration_list[] = {
{"lsm.bloom", "configure bloom filters", C_BOOL | C_TABLE | C_TYPE_LSM, 95, 0, 0}
-{"lsm.bloom_bit_count", "number of bits per item for bloom filters", C_TABLE | C_TYPE_LSM, 4, 64, 1000}
+{"lsm.bloom_bit_count", "number of bits per item for bloom filters", C_TABLE | C_TYPE_LSM, 4, 64, WT_THOUSAND}
{"lsm.bloom_hash_count", "number of hash values per item for bloom filters", C_TABLE | C_TYPE_LSM, 4, 32, 100}
diff --git a/src/third_party/wiredtiger/test/format/format_config.c b/src/third_party/wiredtiger/test/format/format_config.c
index dcdf17d54cb..e3ac21a724b 100644
--- a/src/third_party/wiredtiger/test/format/format_config.c
+++ b/src/third_party/wiredtiger/test/format/format_config.c
@@ -1185,7 +1185,7 @@ config_pct(TABLE *table)
if (config_explicit(table, list[i].name))
pct += *list[i].vp;
else {
- list[i].order = mmrand(NULL, 1, 1000);
+ list[i].order = mmrand(NULL, 1, WT_THOUSAND);
slot_available = true;
}
@@ -1197,7 +1197,7 @@ config_pct(TABLE *table)
WARN("operation percentages %s than 100, resetting to random values",
pct > 100 ? "greater" : "less");
for (i = 0; i < WT_ELEMENTS(list); ++i)
- list[i].order = mmrand(NULL, 1, 1000);
+ list[i].order = mmrand(NULL, 1, WT_THOUSAND);
pct = 0;
}
diff --git a/src/third_party/wiredtiger/test/format/format_config_def.c b/src/third_party/wiredtiger/test/format/format_config_def.c
index a05e212a837..46f21b7f0e7 100644
--- a/src/third_party/wiredtiger/test/format/format_config_def.c
+++ b/src/third_party/wiredtiger/test/format/format_config_def.c
@@ -147,7 +147,7 @@ CONFIG configuration_list[] = {{"assert.read_timestamp", "assert read_timestamp"
{"format.independent_thread_rng", "configure independent thread RNG space", C_BOOL, 75, 0, 0,
V_GLOBAL_FORMAT_INDEPENDENT_THREAD_RNG},
- {"format.major_timeout", "long-running operations timeout (minutes)", C_IGNORE, 0, 0, 1000,
+ {"format.major_timeout", "long-running operations timeout (minutes)", C_IGNORE, 0, 0, WT_THOUSAND,
V_GLOBAL_FORMAT_MAJOR_TIMEOUT},
/*
@@ -162,7 +162,7 @@ CONFIG configuration_list[] = {{"assert.read_timestamp", "assert read_timestamp"
{"logging.compression", "logging compression (off | lz4 | snappy | zlib | zstd)",
C_IGNORE | C_STRING, 0, 0, 0, V_GLOBAL_LOGGING_COMPRESSION},
- {"logging.file_max", "maximum log file size (KB)", 0x0, 100, 512000, 2097152,
+ {"logging.file_max", "maximum log file size (KB)", 0x0, 100, 512 * WT_THOUSAND, 2097152,
V_GLOBAL_LOGGING_FILE_MAX},
{"logging.prealloc", "configure log file pre-allocation", C_BOOL, 50, 0, 0,
@@ -177,7 +177,7 @@ CONFIG configuration_list[] = {{"assert.read_timestamp", "assert read_timestamp"
V_TABLE_LSM_BLOOM},
{"lsm.bloom_bit_count", "number of bits per item for bloom filters", C_TABLE | C_TYPE_LSM, 4, 64,
- 1000, V_TABLE_LSM_BLOOM_BIT_COUNT},
+ WT_THOUSAND, V_TABLE_LSM_BLOOM_BIT_COUNT},
{"lsm.bloom_hash_count", "number of hash values per item for bloom filters", C_TABLE | C_TYPE_LSM,
4, 32, 100, V_TABLE_LSM_BLOOM_HASH_COUNT},
diff --git a/src/third_party/wiredtiger/test/format/hs.c b/src/third_party/wiredtiger/test/format/hs.c
index 79008d5a1aa..fbad2aeefa6 100644
--- a/src/third_party/wiredtiger/test/format/hs.c
+++ b/src/third_party/wiredtiger/test/format/hs.c
@@ -79,7 +79,7 @@ hs_cursor(void *arg)
* blocking normal operations.
*/
next = mmrand(NULL, 0, 1) == 1;
- for (i = mmrand(NULL, 1000, 100000); i > 0; --i) {
+ for (i = mmrand(NULL, WT_THOUSAND, 100 * WT_THOUSAND); i > 0; --i) {
if ((ret = (next ? cursor->next(cursor) : cursor->prev(cursor))) != 0) {
testutil_assertfmt(ret == WT_NOTFOUND || ret == WT_CACHE_FULL || ret == WT_ROLLBACK,
"WT_CURSOR.%s failed: %d", next ? "next" : "prev", ret);
diff --git a/src/third_party/wiredtiger/test/format/import.c b/src/third_party/wiredtiger/test/format/import.c
index ff545437616..77c42435672 100644
--- a/src/third_party/wiredtiger/test/format/import.c
+++ b/src/third_party/wiredtiger/test/format/import.c
@@ -43,7 +43,7 @@ static void verify_import(WT_SESSION *);
* The number of entries in the import table, primary use for validating contents after import.
* There is no benefit to varying the number of entries in the import table.
*/
-#define IMPORT_ENTRIES 1000
+#define IMPORT_ENTRIES WT_THOUSAND
#define IMPORT_TABLE_CONFIG "key_format=i,value_format=i"
#define IMPORT_URI "table:import"
#define IMPORT_URI_FILE "file:import.wt"
diff --git a/src/third_party/wiredtiger/test/format/ops.c b/src/third_party/wiredtiger/test/format/ops.c
index f91ef39163b..1b59ec9e80c 100644
--- a/src/third_party/wiredtiger/test/format/ops.c
+++ b/src/third_party/wiredtiger/test/format/ops.c
@@ -362,7 +362,7 @@ operations(u_int ops_seconds, bool lastrun)
track_ops(&total);
if (!running)
break;
- __wt_sleep(0, 250000); /* 1/4th of a second */
+ __wt_sleep(0, 250 * WT_THOUSAND); /* 1/4th of a second */
if (fourths != -1)
--fourths;
if (quit_fourths != -1 && --quit_fourths == 0) {
@@ -890,9 +890,9 @@ ops(void *arg)
session_op = 0;
/* Set the first operation where we'll reset the session. */
- reset_op = mmrand(&tinfo->rnd, 100, 10000);
+ reset_op = mmrand(&tinfo->rnd, 100, 10 * WT_THOUSAND);
/* Set the first operation where we'll truncate a range. */
- truncate_op = mmrand(&tinfo->rnd, 100, 10000);
+ truncate_op = mmrand(&tinfo->rnd, 100, 10 * WT_THOUSAND);
for (intxn = false; !tinfo->quit;) {
++tinfo->ops;
@@ -909,7 +909,7 @@ ops(void *arg)
session = tinfo->session;
/* Pick the next session/cursor close/open. */
- session_op += mmrand(&tinfo->rnd, 100, 5000);
+ session_op += mmrand(&tinfo->rnd, 100, 5 * WT_THOUSAND);
}
/* If not in a transaction, reset the session periodically so that operation is tested. */
@@ -917,7 +917,7 @@ ops(void *arg)
testutil_check(session->reset(session));
/* Pick the next reset operation. */
- reset_op += mmrand(&tinfo->rnd, 40000, 60000);
+ reset_op += mmrand(&tinfo->rnd, 40 * WT_THOUSAND, 60 * WT_THOUSAND);
}
/*
@@ -986,7 +986,7 @@ ops(void *arg)
op = TRUNCATE;
/* Pick the next truncate operation. */
- truncate_op += mmrand(&tinfo->rnd, 20000, 100000);
+ truncate_op += mmrand(&tinfo->rnd, 20 * WT_THOUSAND, 100 * WT_THOUSAND);
}
} else if (i < TV(OPS_PCT_DELETE) + TV(OPS_PCT_INSERT))
op = INSERT;
@@ -1406,7 +1406,7 @@ wts_read_scan(TABLE *table, void *arg)
WT_ORDERED_READ(max_rows, table->rows_current);
for (keyno = 0; keyno < max_rows;) {
if (++keyno > 50)
- keyno += mmrand(NULL, 1, 1000);
+ keyno += mmrand(NULL, 1, WT_THOUSAND);
if (keyno > max_rows)
keyno = max_rows;
diff --git a/src/third_party/wiredtiger/test/format/random.c b/src/third_party/wiredtiger/test/format/random.c
index 0aba32fcd0b..c88fe8e21f7 100644
--- a/src/third_party/wiredtiger/test/format/random.c
+++ b/src/third_party/wiredtiger/test/format/random.c
@@ -76,7 +76,7 @@ random_kv(void *arg)
wt_wrap_open_cursor(session, table->uri, config, &cursor);
/* This is just a smoke-test, get some key/value pairs. */
- for (i = mmrand(NULL, 0, 1000); i > 0; --i) {
+ for (i = mmrand(NULL, 0, WT_THOUSAND); i > 0; --i) {
switch (ret = cursor->next(cursor)) {
case 0:
break;
diff --git a/src/third_party/wiredtiger/test/format/snap.c b/src/third_party/wiredtiger/test/format/snap.c
index a770c78ce19..2f1d5a366b9 100644
--- a/src/third_party/wiredtiger/test/format/snap.c
+++ b/src/third_party/wiredtiger/test/format/snap.c
@@ -625,7 +625,7 @@ snap_repeat(TINFO *tinfo, SNAP_OPS *snap)
{
WT_DECL_RET;
WT_SESSION *session;
-#define MAX_RETRY_ON_ROLLBACK 1000
+#define MAX_RETRY_ON_ROLLBACK WT_THOUSAND
u_int max_retry;
session = tinfo->session;
diff --git a/src/third_party/wiredtiger/test/format/verify.c b/src/third_party/wiredtiger/test/format/verify.c
index 27dd06696a0..190c137fe02 100644
--- a/src/third_party/wiredtiger/test/format/verify.c
+++ b/src/third_party/wiredtiger/test/format/verify.c
@@ -315,7 +315,8 @@ page_dump:
}
/* Report progress (unless verifying checkpoints which happens during live operations). */
- if (checkpoint == NULL && ((rows < 5000 && rows % 10 == 0) || rows % 5000 == 0))
+ if (checkpoint == NULL &&
+ ((rows < (5 * WT_THOUSAND) && rows % 10 == 0) || rows % (5 * WT_THOUSAND) == 0))
track(buf, rows);
last_match = base_keyno;
}
diff --git a/src/third_party/wiredtiger/test/packing/intpack-test.c b/src/third_party/wiredtiger/test/packing/intpack-test.c
index 48a4e3ead37..ab973ab6f37 100644
--- a/src/third_party/wiredtiger/test/packing/intpack-test.c
+++ b/src/third_party/wiredtiger/test/packing/intpack-test.c
@@ -49,7 +49,7 @@ main(void)
*/
testutil_check(__wt_library_init());
- for (ncalls = 0, i = 0; i < 10000000; i++) {
+ for (ncalls = 0, i = 0; i < 10 * WT_MILLION; i++) {
for (s = 0; s < 50; s += 5) {
++ncalls;
r = 1ULL << s;
diff --git a/src/third_party/wiredtiger/test/packing/intpack-test3.c b/src/third_party/wiredtiger/test/packing/intpack-test3.c
index 4c168f8a83e..70efbba1529 100644
--- a/src/third_party/wiredtiger/test/packing/intpack-test3.c
+++ b/src/third_party/wiredtiger/test/packing/intpack-test3.c
@@ -131,7 +131,7 @@ main(void)
* Test all values in a range, to ensure pack/unpack of small numbers (which most actively use
* different numbers of bits) works.
*/
- test_spread(0, 100000, 100000);
+ test_spread(0, 100 * WT_THOUSAND, 100 * WT_THOUSAND);
test_spread(INT16_MAX, range, range);
test_spread(INT32_MAX, range, range);
test_spread(start_int64, range, range);
diff --git a/src/third_party/wiredtiger/test/readonly/readonly.c b/src/third_party/wiredtiger/test/readonly/readonly.c
index 9564ef08477..30901c11e8f 100644
--- a/src/third_party/wiredtiger/test/readonly/readonly.c
+++ b/src/third_party/wiredtiger/test/readonly/readonly.c
@@ -53,7 +53,7 @@ static const char *const uri = "table:main";
"operation_tracking=(enabled=false),readonly=false,statistics=(all),statistics_log=(json,on_" \
"close,wait=1)"
#define MAX_VAL 4096
-#define MAX_KV 10000
+#define MAX_KV (10 * WT_THOUSAND)
#define EXPECT_ERR 1
#define EXPECT_SUCCESS 0
diff --git a/src/third_party/wiredtiger/test/thread/t.c b/src/third_party/wiredtiger/test/thread/t.c
index 7c8a9693f8e..f2d855baedb 100644
--- a/src/third_party/wiredtiger/test/thread/t.c
+++ b/src/third_party/wiredtiger/test/thread/t.c
@@ -68,8 +68,8 @@ main(int argc, char *argv[])
ftype = ROW;
log_print = 0;
multiple_files = 0;
- nkeys = 1000;
- max_nops = 10000;
+ nkeys = WT_THOUSAND;
+ max_nops = 10 * WT_THOUSAND;
readers = 10;
runs = 1;
session_per_op = 0;
diff --git a/src/third_party/wiredtiger/test/utility/thread.c b/src/third_party/wiredtiger/test/utility/thread.c
index 173e2b468ef..437fa7684f4 100644
--- a/src/third_party/wiredtiger/test/utility/thread.c
+++ b/src/third_party/wiredtiger/test/utility/thread.c
@@ -233,7 +233,7 @@ op_cursor(void *arg)
} else {
/* Put some data in if asked to. */
if (args->testopts->do_data_ops) {
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < WT_THOUSAND; i++) {
cursor->set_key(cursor, i);
cursor->set_value(cursor, "abcdef");
cursor->insert(cursor);
diff --git a/src/third_party/wiredtiger/test/utility/tiered.c b/src/third_party/wiredtiger/test/utility/tiered.c
index 47bab6adf57..1f1405ac42d 100644
--- a/src/third_party/wiredtiger/test/utility/tiered.c
+++ b/src/third_party/wiredtiger/test/utility/tiered.c
@@ -63,7 +63,7 @@ testutil_tiered_sleep(TEST_OPTS *opts, WT_SESSION *session, uint32_t seconds, bo
bool do_flush;
now = testutil_time_us(session);
- wake_time = now + 1000000 * seconds;
+ wake_time = now + WT_MILLION * seconds;
do_flush = false;
if (do_flush_tier != NULL && opts->tiered_flush_next_us != 0 &&
opts->tiered_flush_next_us < wake_time) {
@@ -74,7 +74,7 @@ testutil_tiered_sleep(TEST_OPTS *opts, WT_SESSION *session, uint32_t seconds, bo
while (now < wake_time && opts->running) {
/* Sleep a maximum of one second, so we can make sure we should still be running. */
- if (now + 1000000 < wake_time)
+ if (now + WT_MILLION < wake_time)
__wt_sleep(1, 0);
else
__wt_sleep(0, wake_time - now);
diff --git a/src/third_party/wiredtiger/test/windows/windows_shim.c b/src/third_party/wiredtiger/test/windows/windows_shim.c
index 9899e157fe3..b64c6240b6d 100644
--- a/src/third_party/wiredtiger/test/windows/windows_shim.c
+++ b/src/third_party/wiredtiger/test/windows/windows_shim.c
@@ -35,7 +35,7 @@
int
sleep(int seconds)
{
- Sleep(seconds * 1000);
+ Sleep(seconds * WT_THOUSAND);
return (0);
}
@@ -47,7 +47,7 @@ int
usleep(useconds_t useconds)
{
uint32_t milli;
- milli = useconds / 1000;
+ milli = useconds / WT_THOUSAND;
if (milli == 0)
milli++;
@@ -72,8 +72,8 @@ gettimeofday(struct timeval *tp, void *tzp)
GetSystemTimeAsFileTime(&time);
ns100 = (((int64_t)time.dwHighDateTime << 32) + time.dwLowDateTime) - 116444736000000000LL;
- tp->tv_sec = ns100 / 10000000;
- tp->tv_usec = (long)((ns100 % 10000000) / 10);
+ tp->tv_sec = ns100 / (10 * WT_MILLION);
+ tp->tv_usec = (long)((ns100 % (10 * WT_MILLION)) / 10);
return (0);
}