summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2020-09-03 17:13:42 +1000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-03 07:37:48 +0000
commit4e43587f4b16faa4d2b5307a46c3f059dc6e4884 (patch)
treebab634e1da740631065fccd4939a4a8b50894c9c /src
parentc6b83aca3aa431aff366c27d29eccac850758cef (diff)
downloadmongo-4e43587f4b16faa4d2b5307a46c3f059dc6e4884.tar.gz
Import wiredtiger: 42e4868b7b40ec5a49eec6a0e6cc1bf7eff2cad0 from branch mongodb-4.6
ref: 15b4ef65bc..42e4868b7b for: 4.5.1 WT-5144 Use wt_clock instead of wt_epoch in perf programs WT-5585 Remove cache_overflow config option WT-6561 Provide MongoDB configuration in the wt utility usage output WT-6604 Fix typo in the comment descibing WT_CELL structure WT-6640 Coverity: Failure to restore saved dhandle WT-6641 Coverity: Unused value
Diffstat (limited to 'src')
-rw-r--r--src/third_party/wiredtiger/bench/workgen/workgen.cxx27
-rw-r--r--src/third_party/wiredtiger/bench/workgen/workgen_func.c6
-rw-r--r--src/third_party/wiredtiger/bench/workgen/workgen_func.h1
-rw-r--r--src/third_party/wiredtiger/bench/workgen/workgen_int.h13
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/idle_table_cycle.c10
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf.c62
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py12
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c96
-rw-r--r--src/third_party/wiredtiger/src/history/hs.c8
-rw-r--r--src/third_party/wiredtiger/src/include/cell.h8
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in17
-rw-r--r--src/third_party/wiredtiger/src/session/session_api.c5
-rw-r--r--src/third_party/wiredtiger/src/utilities/util_main.c4
14 files changed, 110 insertions, 161 deletions
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen.cxx b/src/third_party/wiredtiger/bench/workgen/workgen.cxx
index 739b50ebb27..e8ee0298007 100644
--- a/src/third_party/wiredtiger/bench/workgen/workgen.cxx
+++ b/src/third_party/wiredtiger/bench/workgen/workgen.cxx
@@ -841,9 +841,9 @@ int ThreadRunner::op_run(Operation *op) {
(track->ops % _workload->options.sample_rate == 0);
VERBOSE(*this, "OP " << op->_optype << " " << op->_table._uri.c_str() << ", recno=" << recno);
- timespec start;
+ uint64_t start;
if (measure_latency)
- workgen_epoch(&start);
+ workgen_clock(&start);
// Whether or not we are measuring latency, we track how many operations
// are in progress, or that complete.
@@ -929,15 +929,15 @@ int ThreadRunner::op_run(Operation *op) {
}
if (measure_latency) {
- timespec stop;
- workgen_epoch(&stop);
- track->complete_with_latency(ts_us(stop - start));
+ uint64_t stop;
+ workgen_clock(&stop);
+ track->complete_with_latency(ns_to_us(stop - start));
} else if (track != NULL)
track->complete();
if (op->_group != NULL) {
uint64_t endtime = 0;
- timespec now;
+ uint64_t now;
if (op->_timed != 0.0)
endtime = _op_time_us + secs_us(op->_timed);
@@ -951,8 +951,8 @@ int ThreadRunner::op_run(Operation *op) {
i != op->_group->end(); i++)
WT_ERR(op_run(&*i));
}
- workgen_epoch(&now);
- } while (!_stop && ts_us(now) < endtime);
+ workgen_clock(&now);
+ } while (!_stop && ns_to_us(now) < endtime);
if (op->_timed != 0.0)
_op_time_us = endtime;
@@ -1487,14 +1487,13 @@ void SleepOperationInternal::parse_config(const std::string &config)
int SleepOperationInternal::run(ThreadRunner *runner, WT_SESSION *session)
{
uint64_t endtime;
- timespec now;
- uint64_t now_us;
+ uint64_t now, now_us;
(void)runner; /* not used */
(void)session; /* not used */
- workgen_epoch(&now);
- now_us = ts_us(now);
+ workgen_clock(&now);
+ now_us = ns_to_us(now);
if (runner->_thread->options.synchronized)
endtime = runner->_op_time_us + secs_us(_sleepvalue);
else
@@ -1509,8 +1508,8 @@ int SleepOperationInternal::run(ThreadRunner *runner, WT_SESSION *session)
else
usleep(sleep_us);
- workgen_epoch(&now);
- now_us = ts_us(now);
+ workgen_clock(&now);
+ now_us = ns_to_us(now);
}
return (0);
}
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen_func.c b/src/third_party/wiredtiger/bench/workgen/workgen_func.c
index 14fa5f64d94..88ca4c597d1 100644
--- a/src/third_party/wiredtiger/bench/workgen/workgen_func.c
+++ b/src/third_party/wiredtiger/bench/workgen/workgen_func.c
@@ -50,6 +50,12 @@ workgen_atomic_add64(uint64_t *vp, uint64_t v)
}
void
+workgen_clock(uint64_t *clockp)
+{
+ *clockp = __wt_clock(NULL);
+}
+
+void
workgen_epoch(struct timespec *tsp)
{
__wt_epoch(NULL, tsp);
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen_func.h b/src/third_party/wiredtiger/bench/workgen/workgen_func.h
index 7d303d0e4e9..9132bcc9358 100644
--- a/src/third_party/wiredtiger/bench/workgen/workgen_func.h
+++ b/src/third_party/wiredtiger/bench/workgen/workgen_func.h
@@ -29,6 +29,7 @@ struct workgen_random_state;
extern uint32_t workgen_atomic_add32(uint32_t *vp, uint32_t v);
extern uint64_t workgen_atomic_add64(uint64_t *vp, uint64_t v);
+extern void workgen_clock(uint64_t *tsp);
extern void workgen_epoch(struct timespec *tsp);
extern uint32_t workgen_random(struct workgen_random_state volatile *rnd_state);
extern int workgen_random_alloc(WT_SESSION *session, struct workgen_random_state **rnd_state);
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen_int.h b/src/third_party/wiredtiger/bench/workgen/workgen_int.h
index d5ed99c8c53..ae1d21d1343 100644
--- a/src/third_party/wiredtiger/bench/workgen/workgen_int.h
+++ b/src/third_party/wiredtiger/bench/workgen/workgen_int.h
@@ -51,10 +51,10 @@ struct WorkgenTimeStamp {
WorkgenTimeStamp() {}
static uint64_t get_timestamp_lag(double seconds) {
- timespec start_time;
- workgen_epoch(&start_time);
+ uint64_t start_time;
+ workgen_clock(&start_time);
- return (ts_us(start_time) - secs_us(seconds));
+ return (ns_to_us(start_time) - secs_us(seconds));
}
static void sleep(double seconds) {
@@ -62,10 +62,9 @@ struct WorkgenTimeStamp {
}
static uint64_t get_timestamp() {
- timespec start_time;
- workgen_epoch(&start_time);
-
- return (ts_us(start_time));
+ uint64_t start_time;
+ workgen_clock(&start_time);
+ return (ns_to_us(start_time));
}
};
diff --git a/src/third_party/wiredtiger/bench/wtperf/idle_table_cycle.c b/src/third_party/wiredtiger/bench/wtperf/idle_table_cycle.c
index ee9182b0e40..e5f8d97bc9a 100644
--- a/src/third_party/wiredtiger/bench/wtperf/idle_table_cycle.c
+++ b/src/third_party/wiredtiger/bench/wtperf/idle_table_cycle.c
@@ -29,16 +29,16 @@
#include "wtperf.h"
static int
-check_timing(WTPERF *wtperf, const char *name, struct timespec start, struct timespec *stop)
+check_timing(WTPERF *wtperf, const char *name, uint64_t start, uint64_t *stop)
{
CONFIG_OPTS *opts;
uint64_t last_interval;
opts = wtperf->opts;
- __wt_epoch(NULL, stop);
+ *stop = __wt_clock(NULL);
- last_interval = (uint64_t)(WT_TIMEDIFF_SEC(*stop, start));
+ last_interval = WT_CLOCKDIFF_SEC(*stop, start);
if (last_interval > opts->idle_table_cycle) {
lprintf(wtperf, ETIMEDOUT, 0,
@@ -57,11 +57,11 @@ check_timing(WTPERF *wtperf, const char *name, struct timespec start, struct tim
static WT_THREAD_RET
cycle_idle_tables(void *arg)
{
- struct timespec start, stop;
CONFIG_OPTS *opts;
WTPERF *wtperf;
WT_CURSOR *cursor;
WT_SESSION *session;
+ uint64_t start, stop;
int cycle_count, ret;
char uri[512];
@@ -81,7 +81,7 @@ cycle_idle_tables(void *arg)
__wt_sleep(1, 0);
/* Setup a start timer. */
- __wt_epoch(NULL, &start);
+ start = __wt_clock(NULL);
/* Create a table. */
if ((ret = session->create(session, uri, opts->table_config)) != 0) {
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf.c b/src/third_party/wiredtiger/bench/wtperf/wtperf.c
index b286ff43008..6eefbbf373f 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf.c
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf.c
@@ -499,7 +499,6 @@ pre_load_data(WTPERF *wtperf)
static WT_THREAD_RET
worker(void *arg)
{
- struct timespec start, stop;
CONFIG_OPTS *opts;
TRACK *trk;
WORKLOAD *workload;
@@ -512,7 +511,7 @@ worker(void *arg)
WT_SESSION *session;
size_t i, iter, modify_offset, modify_size, total_modify_size, value_len;
int64_t delta, ops, ops_per_txn;
- uint64_t log_id, next_val, usecs;
+ uint64_t log_id, next_val, start, stop, usecs;
uint32_t rand_val, total_table_count;
uint8_t *op, *op_end;
int measure_latency, nmodify, ret, truncated;
@@ -654,7 +653,7 @@ worker(void *arg)
*/
measure_latency = opts->sample_interval != 0 && trk != NULL && trk->ops != 0 &&
(trk->ops % opts->sample_rate == 0);
- __wt_epoch(NULL, &start); /* [-Werror=maybe-uninitialized] */
+ start = __wt_clock(NULL);
cursor->set_key(cursor, key_buf);
switch (*op) {
@@ -891,9 +890,9 @@ op_err:
/* Gather statistics */
if (!wtperf->in_warmup) {
if (measure_latency) {
- __wt_epoch(NULL, &stop);
+ stop = __wt_clock(NULL);
++trk->latency_ops;
- usecs = WT_TIMEDIFF_US(stop, start);
+ usecs = WT_CLOCKDIFF_US(stop, start);
track_operation(trk, usecs);
}
/* Increment operation count */
@@ -1061,7 +1060,6 @@ run_mix_schedule(WTPERF *wtperf, WORKLOAD *workp)
static WT_THREAD_RET
populate_thread(void *arg)
{
- struct timespec start, stop;
CONFIG_OPTS *opts;
TRACK *trk;
WTPERF *wtperf;
@@ -1070,7 +1068,7 @@ populate_thread(void *arg)
WT_CURSOR **cursors, *cursor;
WT_SESSION *session;
size_t i;
- uint64_t op, usecs;
+ uint64_t op, start, stop, usecs;
uint32_t opcount, total_table_count;
int intxn, measure_latency, ret, stress_checkpoint_due;
char *value_buf, *key_buf;
@@ -1083,6 +1081,7 @@ populate_thread(void *arg)
session = NULL;
cursors = NULL;
ret = stress_checkpoint_due = 0;
+ start = 0;
trk = &thread->insert;
total_table_count = opts->table_count + opts->scan_table_count;
@@ -1127,7 +1126,7 @@ populate_thread(void *arg)
measure_latency =
opts->sample_interval != 0 && trk->ops != 0 && (trk->ops % opts->sample_rate == 0);
if (measure_latency)
- __wt_epoch(NULL, &start);
+ start = __wt_clock(NULL);
cursor->set_key(cursor, key_buf);
if (opts->random_value)
randomize_value(thread, value_buf, 0);
@@ -1149,9 +1148,9 @@ populate_thread(void *arg)
* multiple tables, it is the time for insertion into all of them.
*/
if (measure_latency) {
- __wt_epoch(NULL, &stop);
+ stop = __wt_clock(NULL);
++trk->latency_ops;
- usecs = WT_TIMEDIFF_US(stop, start);
+ usecs = WT_CLOCKDIFF_US(stop, start);
track_operation(trk, usecs);
}
++thread->insert.ops; /* Same as trk->ops */
@@ -1197,7 +1196,6 @@ err:
static WT_THREAD_RET
populate_async(void *arg)
{
- struct timespec start, stop;
CONFIG_OPTS *opts;
TRACK *trk;
WTPERF *wtperf;
@@ -1205,7 +1203,7 @@ populate_async(void *arg)
WT_ASYNC_OP *asyncop;
WT_CONNECTION *conn;
WT_SESSION *session;
- uint64_t op, usecs;
+ uint64_t op, start, stop, usecs;
int measure_latency, ret;
char *value_buf, *key_buf;
@@ -1215,6 +1213,7 @@ populate_async(void *arg)
conn = wtperf->conn;
session = NULL;
ret = 0;
+ start = 0;
trk = &thread->insert;
key_buf = thread->key_buf;
@@ -1232,7 +1231,7 @@ populate_async(void *arg)
measure_latency =
opts->sample_interval != 0 && trk->ops != 0 && (trk->ops % opts->sample_rate == 0);
if (measure_latency)
- __wt_epoch(NULL, &start);
+ start = __wt_clock(NULL);
/* Populate the databases. */
for (;;) {
@@ -1273,9 +1272,9 @@ populate_async(void *arg)
goto err;
}
if (measure_latency) {
- __wt_epoch(NULL, &stop);
+ stop = __wt_clock(NULL);
++trk->latency_ops;
- usecs = WT_TIMEDIFF_US(stop, start);
+ usecs = WT_CLOCKDIFF_US(stop, start);
track_operation(trk, usecs);
}
if ((ret = session->close(session, NULL)) != 0) {
@@ -1508,7 +1507,6 @@ checkpoint_worker(void *arg)
WTPERF_THREAD *thread;
WT_CONNECTION *conn;
WT_SESSION *session;
- struct timespec e, s;
uint32_t i;
int ret;
@@ -1534,8 +1532,6 @@ checkpoint_worker(void *arg)
if (wtperf->stop)
break;
- __wt_epoch(NULL, &s);
-
wtperf->ckpt = true;
if ((ret = session->checkpoint(session, NULL)) != 0) {
lprintf(wtperf, ret, 0, "Checkpoint failed.");
@@ -1543,8 +1539,6 @@ checkpoint_worker(void *arg)
}
wtperf->ckpt = false;
++thread->ckpt.ops;
-
- __wt_epoch(NULL, &e);
}
if (session != NULL && ((ret = session->close(session, NULL)) != 0)) {
@@ -1571,7 +1565,6 @@ scan_worker(void *arg)
WT_CURSOR *cursor, **cursors;
WT_SESSION *session;
char *key_buf;
- struct timespec e, s;
uint32_t i, ntables, pct, table_start;
uint64_t cur_id, end_id, incr, items, start_id, tot_items;
int ret;
@@ -1634,8 +1627,6 @@ scan_worker(void *arg)
if (wtperf->stop)
break;
- __wt_epoch(NULL, &s);
-
wtperf->scan = true;
items = 0;
while (items < tot_items && !wtperf->stop) {
@@ -1660,7 +1651,6 @@ scan_worker(void *arg)
}
wtperf->scan = false;
++thread->scan.ops;
- __wt_epoch(NULL, &e);
}
if (session != NULL && ((ret = session->close(session, NULL)) != 0)) {
@@ -1680,13 +1670,12 @@ err:
static int
execute_populate(WTPERF *wtperf)
{
- struct timespec start, stop;
CONFIG_OPTS *opts;
WT_ASYNC_OP *asyncop;
WTPERF_THREAD *popth;
WT_THREAD_CALLBACK (*pfunc)(void *);
size_t i;
- uint64_t last_ops, msecs, print_ops_sec, max_key;
+ uint64_t last_ops, max_key, msecs, print_ops_sec, start, stop;
uint32_t interval, tables;
wt_thread_t idle_table_cycle_thread;
double print_secs;
@@ -1711,7 +1700,7 @@ execute_populate(WTPERF *wtperf)
pfunc = populate_thread;
start_threads(wtperf, NULL, wtperf->popthreads, opts->populate_threads, pfunc);
- __wt_epoch(NULL, &start);
+ start = __wt_clock(NULL);
for (elapsed = 0, interval = 0, last_ops = 0; wtperf->insert_key < max_key && !wtperf->error;) {
/*
* Sleep for 100th of a second, report_interval is in second granularity, each 100th
@@ -1733,7 +1722,7 @@ execute_populate(WTPERF *wtperf)
wtperf->totalsec);
last_ops = wtperf->insert_ops;
}
- __wt_epoch(NULL, &stop);
+ stop = __wt_clock(NULL);
/*
* Move popthreads aside to narrow possible race with the monitor thread. The latency tracking
@@ -1752,7 +1741,7 @@ execute_populate(WTPERF *wtperf)
}
lprintf(wtperf, 0, 1, "Finished load of %" PRIu32 " items", opts->icount);
- msecs = WT_TIMEDIFF_MS(stop, start);
+ msecs = WT_CLOCKDIFF_MS(stop, start);
/*
* This is needed as the divisions will fail if the insert takes no time which will only be the
@@ -1777,7 +1766,7 @@ execute_populate(WTPERF *wtperf)
if (opts->compact) {
assert(opts->async_threads > 0);
lprintf(wtperf, 0, 1, "Compact after populate");
- __wt_epoch(NULL, &start);
+ start = __wt_clock(NULL);
tables = opts->table_count;
for (i = 0; i < opts->table_count; i++) {
/*
@@ -1799,9 +1788,9 @@ execute_populate(WTPERF *wtperf)
lprintf(wtperf, ret, 0, "Populate async flush failed.");
return (ret);
}
- __wt_epoch(NULL, &stop);
+ stop = __wt_clock(NULL);
lprintf(wtperf, 0, 1, "Compact completed in %" PRIu64 " seconds",
- (uint64_t)(WT_TIMEDIFF_SEC(stop, start)));
+ (uint64_t)(WT_CLOCKDIFF_SEC(stop, start)));
assert(tables == 0);
}
@@ -2897,12 +2886,11 @@ recreate_dir(const char *name)
static int
drop_all_tables(WTPERF *wtperf)
{
- struct timespec start, stop;
CONFIG_OPTS *opts;
WT_SESSION *session;
size_t i;
uint32_t total_table_count;
- uint64_t msecs;
+ uint64_t msecs, start, stop;
int ret, t_ret;
opts = wtperf->opts;
@@ -2913,15 +2901,15 @@ drop_all_tables(WTPERF *wtperf)
lprintf(wtperf, ret, 0, "Error opening a session on %s", wtperf->home);
return (ret);
}
- __wt_epoch(NULL, &start);
+ start = __wt_clock(NULL);
for (i = 0; i < total_table_count; i++) {
if ((ret = session->drop(session, wtperf->uris[i], NULL)) != 0) {
lprintf(wtperf, ret, 0, "Error dropping table %s", wtperf->uris[i]);
goto err;
}
}
- __wt_epoch(NULL, &stop);
- msecs = WT_TIMEDIFF_MS(stop, start);
+ stop = __wt_clock(NULL);
+ msecs = WT_CLOCKDIFF_MS(stop, start);
lprintf(wtperf, 0, 1, "Executed %" PRIu32 " drop operations average time %" PRIu64 "ms",
total_table_count, msecs / total_table_count);
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index fcc32e3b864..c2139a07202 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -452,18 +452,6 @@ connection_runtime_config = [
for space to be available in cache before giving up. Default will
wait forever''',
min=0),
- Config('cache_overflow', '', r'''
- cache overflow configuration options''',
- type='category', subconfig=[
- Config('file_max', '0', r'''
- The maximum number of bytes that WiredTiger is allowed to use for
- its cache overflow mechanism. If the cache overflow file exceeds
- this size, a panic will be triggered. The default value means that
- the cache overflow file is unbounded and may use as much space as
- the filesystem will accommodate. The minimum non-zero setting is
- 100MB.''', # !!! TODO: WT-5585 To be removed when we switch to history_store config
- min='0')
- ]),
Config('history_store', '', r'''
history store configuration options''',
type='category', subconfig=[
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 3ffe2719211..84b893446d0 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-4.6",
- "commit": "15b4ef65bcd4dac075a5aa3fd03f013abc11c21e"
+ "commit": "42e4868b7b40ec5a49eec6a0e6cc1bf7eff2cad0"
}
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index 4b5248d6764..6c7931360fb 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -42,9 +42,6 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_async_subconfigs[] = {
{"enabled", "boolean", NULL, NULL, NULL, 0}, {"ops_max", "int", NULL, "min=1,max=4096", NULL, 0},
{"threads", "int", NULL, "min=1,max=20", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}};
-static const WT_CONFIG_CHECK confchk_wiredtiger_open_cache_overflow_subconfigs[] = {
- {"file_max", "int", NULL, "min=0", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}};
-
static const WT_CONFIG_CHECK confchk_wiredtiger_open_checkpoint_subconfigs[] = {
{"log_size", "int", NULL, "min=0,max=2GB", NULL, 0},
{"wait", "int", NULL, "min=0,max=100000", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}};
@@ -104,7 +101,6 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure_statistics_log_su
static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = {
{"async", "category", NULL, NULL, confchk_wiredtiger_open_async_subconfigs, 3},
{"cache_max_wait_ms", "int", NULL, "min=0", NULL, 0},
- {"cache_overflow", "category", NULL, NULL, confchk_wiredtiger_open_cache_overflow_subconfigs, 1},
{"cache_overhead", "int", NULL, "min=0,max=30", NULL, 0},
{"cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0},
{"checkpoint", "category", NULL, NULL, confchk_wiredtiger_open_checkpoint_subconfigs, 2},
@@ -544,7 +540,6 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"builtin_extension_config", "string", NULL, NULL, NULL, 0},
{"cache_cursors", "boolean", NULL, NULL, NULL, 0},
{"cache_max_wait_ms", "int", NULL, "min=0", NULL, 0},
- {"cache_overflow", "category", NULL, NULL, confchk_wiredtiger_open_cache_overflow_subconfigs, 1},
{"cache_overhead", "int", NULL, "min=0,max=30", NULL, 0},
{"cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0},
{"checkpoint", "category", NULL, NULL, confchk_wiredtiger_open_checkpoint_subconfigs, 2},
@@ -622,7 +617,6 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"builtin_extension_config", "string", NULL, NULL, NULL, 0},
{"cache_cursors", "boolean", NULL, NULL, NULL, 0},
{"cache_max_wait_ms", "int", NULL, "min=0", NULL, 0},
- {"cache_overflow", "category", NULL, NULL, confchk_wiredtiger_open_cache_overflow_subconfigs, 1},
{"cache_overhead", "int", NULL, "min=0,max=30", NULL, 0},
{"cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0},
{"checkpoint", "category", NULL, NULL, confchk_wiredtiger_open_checkpoint_subconfigs, 2},
@@ -700,7 +694,6 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"builtin_extension_config", "string", NULL, NULL, NULL, 0},
{"cache_cursors", "boolean", NULL, NULL, NULL, 0},
{"cache_max_wait_ms", "int", NULL, "min=0", NULL, 0},
- {"cache_overflow", "category", NULL, NULL, confchk_wiredtiger_open_cache_overflow_subconfigs, 1},
{"cache_overhead", "int", NULL, "min=0,max=30", NULL, 0},
{"cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0},
{"checkpoint", "category", NULL, NULL, confchk_wiredtiger_open_checkpoint_subconfigs, 2},
@@ -773,7 +766,6 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"builtin_extension_config", "string", NULL, NULL, NULL, 0},
{"cache_cursors", "boolean", NULL, NULL, NULL, 0},
{"cache_max_wait_ms", "int", NULL, "min=0", NULL, 0},
- {"cache_overflow", "category", NULL, NULL, confchk_wiredtiger_open_cache_overflow_subconfigs, 1},
{"cache_overhead", "int", NULL, "min=0,max=30", NULL, 0},
{"cache_size", "int", NULL, "min=1MB,max=10TB", NULL, 0},
{"checkpoint", "category", NULL, NULL, confchk_wiredtiger_open_checkpoint_subconfigs, 2},
@@ -861,8 +853,8 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
{"WT_CONNECTION.query_timestamp", "get=all_durable", confchk_WT_CONNECTION_query_timestamp, 1},
{"WT_CONNECTION.reconfigure",
"async=(enabled=false,ops_max=1024,threads=2),cache_max_wait_ms=0"
- ",cache_overflow=(file_max=0),cache_overhead=8,cache_size=100MB,"
- "checkpoint=(log_size=0,wait=0),compatibility=(release=),"
+ ",cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0,"
+ "wait=0),compatibility=(release=),"
"debug_mode=(checkpoint_retention=0,cursor_copy=false,"
"eviction=false,log_retention=0,realloc_exact=false,"
"rollback_error=0,slow_checkpoint=false,table_logging=false),"
@@ -880,7 +872,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"statistics=none,statistics_log=(json=false,on_close=false,"
"sources=,timestamp=\"%b %d %H:%M:%S\",wait=0),"
"timing_stress_for_test=,verbose=",
- confchk_WT_CONNECTION_reconfigure, 29},
+ confchk_WT_CONNECTION_reconfigure, 28},
{"WT_CONNECTION.rollback_to_stable", "", NULL, 0}, {"WT_CONNECTION.set_file_system", "", NULL, 0},
{"WT_CONNECTION.set_timestamp",
"commit_timestamp=,durable_timestamp=,force=false,"
@@ -1039,16 +1031,15 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
{"wiredtiger_open",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
- "cache_max_wait_ms=0,cache_overflow=(file_max=0),cache_overhead=8"
- ",cache_size=100MB,checkpoint=(log_size=0,wait=0),"
- "checkpoint_sync=true,compatibility=(release=,require_max=,"
- "require_min=),config_base=true,create=false,"
- "debug_mode=(checkpoint_retention=0,cursor_copy=false,"
- "eviction=false,log_retention=0,realloc_exact=false,"
- "rollback_error=0,slow_checkpoint=false,table_logging=false),"
- "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
- "eviction=(threads_max=8,threads_min=1),"
- "eviction_checkpoint_target=1,eviction_dirty_target=5,"
+ "cache_max_wait_ms=0,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,"
+ "compatibility=(release=,require_max=,require_min=),"
+ "config_base=true,create=false,debug_mode=(checkpoint_retention=0"
+ ",cursor_copy=false,eviction=false,log_retention=0,"
+ "realloc_exact=false,rollback_error=0,slow_checkpoint=false,"
+ "table_logging=false),direct_io=,encryption=(keyid=,name=,"
+ "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)"
+ ",eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
"exclusive=false,extensions=,file_close_sync=true,file_extend=,"
@@ -1068,20 +1059,19 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
",wait=0),timing_stress_for_test=,transaction_sync=(enabled=false"
",method=fsync),use_environment=true,use_environment_priv=false,"
"verbose=,verify_metadata=false,write_through=",
- confchk_wiredtiger_open, 57},
+ confchk_wiredtiger_open, 56},
{"wiredtiger_open_all",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
- "cache_max_wait_ms=0,cache_overflow=(file_max=0),cache_overhead=8"
- ",cache_size=100MB,checkpoint=(log_size=0,wait=0),"
- "checkpoint_sync=true,compatibility=(release=,require_max=,"
- "require_min=),config_base=true,create=false,"
- "debug_mode=(checkpoint_retention=0,cursor_copy=false,"
- "eviction=false,log_retention=0,realloc_exact=false,"
- "rollback_error=0,slow_checkpoint=false,table_logging=false),"
- "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
- "eviction=(threads_max=8,threads_min=1),"
- "eviction_checkpoint_target=1,eviction_dirty_target=5,"
+ "cache_max_wait_ms=0,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,"
+ "compatibility=(release=,require_max=,require_min=),"
+ "config_base=true,create=false,debug_mode=(checkpoint_retention=0"
+ ",cursor_copy=false,eviction=false,log_retention=0,"
+ "realloc_exact=false,rollback_error=0,slow_checkpoint=false,"
+ "table_logging=false),direct_io=,encryption=(keyid=,name=,"
+ "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)"
+ ",eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
"exclusive=false,extensions=,file_close_sync=true,file_extend=,"
@@ -1102,19 +1092,19 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
",method=fsync),use_environment=true,use_environment_priv=false,"
"verbose=,verify_metadata=false,version=(major=0,minor=0),"
"write_through=",
- confchk_wiredtiger_open_all, 58},
+ confchk_wiredtiger_open_all, 57},
{"wiredtiger_open_basecfg",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
- "cache_max_wait_ms=0,cache_overflow=(file_max=0),cache_overhead=8"
- ",cache_size=100MB,checkpoint=(log_size=0,wait=0),"
- "checkpoint_sync=true,compatibility=(release=,require_max=,"
- "require_min=),debug_mode=(checkpoint_retention=0,"
- "cursor_copy=false,eviction=false,log_retention=0,"
- "realloc_exact=false,rollback_error=0,slow_checkpoint=false,"
- "table_logging=false),direct_io=,encryption=(keyid=,name=,"
- "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)"
- ",eviction_checkpoint_target=1,eviction_dirty_target=5,"
+ "cache_max_wait_ms=0,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,"
+ "compatibility=(release=,require_max=,require_min=),"
+ "debug_mode=(checkpoint_retention=0,cursor_copy=false,"
+ "eviction=false,log_retention=0,realloc_exact=false,"
+ "rollback_error=0,slow_checkpoint=false,table_logging=false),"
+ "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
+ "eviction=(threads_max=8,threads_min=1),"
+ "eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
"extensions=,file_close_sync=true,file_extend=,"
@@ -1134,19 +1124,19 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"timing_stress_for_test=,transaction_sync=(enabled=false,"
"method=fsync),verbose=,verify_metadata=false,version=(major=0,"
"minor=0),write_through=",
- confchk_wiredtiger_open_basecfg, 52},
+ confchk_wiredtiger_open_basecfg, 51},
{"wiredtiger_open_usercfg",
"async=(enabled=false,ops_max=1024,threads=2),buffer_alignment=-1"
",builtin_extension_config=,cache_cursors=true,"
- "cache_max_wait_ms=0,cache_overflow=(file_max=0),cache_overhead=8"
- ",cache_size=100MB,checkpoint=(log_size=0,wait=0),"
- "checkpoint_sync=true,compatibility=(release=,require_max=,"
- "require_min=),debug_mode=(checkpoint_retention=0,"
- "cursor_copy=false,eviction=false,log_retention=0,"
- "realloc_exact=false,rollback_error=0,slow_checkpoint=false,"
- "table_logging=false),direct_io=,encryption=(keyid=,name=,"
- "secretkey=),error_prefix=,eviction=(threads_max=8,threads_min=1)"
- ",eviction_checkpoint_target=1,eviction_dirty_target=5,"
+ "cache_max_wait_ms=0,cache_overhead=8,cache_size=100MB,"
+ "checkpoint=(log_size=0,wait=0),checkpoint_sync=true,"
+ "compatibility=(release=,require_max=,require_min=),"
+ "debug_mode=(checkpoint_retention=0,cursor_copy=false,"
+ "eviction=false,log_retention=0,realloc_exact=false,"
+ "rollback_error=0,slow_checkpoint=false,table_logging=false),"
+ "direct_io=,encryption=(keyid=,name=,secretkey=),error_prefix=,"
+ "eviction=(threads_max=8,threads_min=1),"
+ "eviction_checkpoint_target=1,eviction_dirty_target=5,"
"eviction_dirty_trigger=20,eviction_target=80,eviction_trigger=95"
",eviction_updates_target=0,eviction_updates_trigger=0,"
"extensions=,file_close_sync=true,file_extend=,"
@@ -1165,7 +1155,7 @@ static const WT_CONFIG_ENTRY config_entries[] = {{"WT_CONNECTION.add_collator",
"path=\".\",sources=,timestamp=\"%b %d %H:%M:%S\",wait=0),"
"timing_stress_for_test=,transaction_sync=(enabled=false,"
"method=fsync),verbose=,verify_metadata=false,write_through=",
- confchk_wiredtiger_open_usercfg, 51},
+ confchk_wiredtiger_open_usercfg, 50},
{NULL, NULL, NULL, 0}};
int
diff --git a/src/third_party/wiredtiger/src/history/hs.c b/src/third_party/wiredtiger/src/history/hs.c
index 00c1c40e5b6..f47305d341c 100644
--- a/src/third_party/wiredtiger/src/history/hs.c
+++ b/src/third_party/wiredtiger/src/history/hs.c
@@ -87,14 +87,6 @@ __wt_hs_config(WT_SESSION_IMPL *session, const char **cfg)
WT_ERR_MSG(session, EINVAL, "max history store size %" PRId64 " below minimum %d", cval.val,
WT_HS_FILE_MIN);
- /* TODO: WT-5585 Remove after we switch to using history_store config in MongoDB. */
- if (cval.val == 0) {
- WT_ERR(__wt_config_gets(session, cfg, "cache_overflow.file_max", &cval));
- if (cval.val != 0 && cval.val < WT_HS_FILE_MIN)
- WT_ERR_MSG(session, EINVAL, "max history store size %" PRId64 " below minimum %d",
- cval.val, WT_HS_FILE_MIN);
- }
-
/* in-memory or readonly configurations do not have a history store. */
if (F_ISSET(conn, WT_CONN_IN_MEMORY | WT_CONN_READONLY))
return (0);
diff --git a/src/third_party/wiredtiger/src/include/cell.h b/src/third_party/wiredtiger/src/include/cell.h
index 3c63fe4f49d..e17a0370425 100644
--- a/src/third_party/wiredtiger/src/include/cell.h
+++ b/src/third_party/wiredtiger/src/include/cell.h
@@ -49,10 +49,10 @@
* Bits 1 and 2 are reserved for "short" key and value cells (that is, a cell
* carrying data less than 64B, where we can store the data length in the cell
* descriptor byte):
- * 0x00 Not a short key/data cell
- * 0x01 Short key cell
- * 0x10 Short key cell, with a following prefix-compression byte
- * 0x11 Short value cell
+ * 0b00 Not a short key/data cell
+ * 0b01 Short key cell
+ * 0b10 Short key cell, with a following prefix-compression byte
+ * 0b11 Short value cell
* In the "short" variants, the other 6 bits of the descriptor byte are the
* data length.
*
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 8737ffccd37..f65dbc350b0 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -2156,15 +2156,6 @@ struct __wt_connection {
* @config{cache_max_wait_ms, the maximum number of milliseconds an application thread will
* wait for space to be available in cache before giving up. Default will wait forever., an
* integer greater than or equal to 0; default \c 0.}
- * @config{cache_overflow = (, cache overflow configuration options., a set of related
- * configuration options defined below.}
- * @config{&nbsp;&nbsp;&nbsp;&nbsp;file_max, The
- * maximum number of bytes that WiredTiger is allowed to use for its cache overflow
- * mechanism. If the cache overflow file exceeds this size\, a panic will be triggered.
- * The default value means that the cache overflow file is unbounded and may use as much
- * space as the filesystem will accommodate. The minimum non-zero setting is 100MB., an
- * integer greater than or equal to 0; default \c 0.}
- * @config{ ),,}
* @config{cache_overhead, assume the heap allocator overhead is the specified percentage\,
* and adjust the cache usage by that amount (for example\, if there is 10GB of data in
* cache\, a percentage of 10 means WiredTiger treats this as 11GB). This value is
@@ -2779,14 +2770,6 @@ struct __wt_connection {
* @config{cache_max_wait_ms, the maximum number of milliseconds an application thread will wait for
* space to be available in cache before giving up. Default will wait forever., an integer greater
* than or equal to 0; default \c 0.}
- * @config{cache_overflow = (, cache overflow configuration options., a set of related configuration
- * options defined below.}
- * @config{&nbsp;&nbsp;&nbsp;&nbsp;file_max, The maximum number of bytes
- * that WiredTiger is allowed to use for its cache overflow mechanism. If the cache overflow file
- * exceeds this size\, a panic will be triggered. The default value means that the cache overflow
- * file is unbounded and may use as much space as the filesystem will accommodate. The minimum
- * non-zero setting is 100MB., an integer greater than or equal to 0; default \c 0.}
- * @config{ ),,}
* @config{cache_overhead, assume the heap allocator overhead is the specified percentage\, and
* adjust the cache usage by that amount (for example\, if there is 10GB of data in cache\, a
* percentage of 10 means WiredTiger treats this as 11GB). This value is configurable because
diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c
index d0c847ad0f3..ac7cef167ff 100644
--- a/src/third_party/wiredtiger/src/session/session_api.c
+++ b/src/third_party/wiredtiger/src/session/session_api.c
@@ -267,7 +267,8 @@ __session_close(WT_SESSION *wt_session, const char *config)
SESSION_API_CALL_PREPARE_ALLOWED(session, close, config, cfg);
WT_UNUSED(cfg);
- return (__wt_session_close_internal(session));
+ WT_ERR(__wt_session_close_internal(session));
+ session = NULL;
err:
API_END_RET_NOTFOUND_MAP(session, ret);
@@ -364,8 +365,6 @@ __wt_session_close_internal(WT_SESSION_IMPL *session)
__wt_spin_unlock(session, &conn->api_lock);
- /* We no longer have a session, don't try to update it. */
- session = NULL;
return (ret);
}
diff --git a/src/third_party/wiredtiger/src/utilities/util_main.c b/src/third_party/wiredtiger/src/utilities/util_main.c
index fdf6baad752..3d83839962f 100644
--- a/src/third_party/wiredtiger/src/utilities/util_main.c
+++ b/src/third_party/wiredtiger/src/utilities/util_main.c
@@ -16,6 +16,9 @@ bool verbose = false; /* Verbose flag */
static const char *command; /* Command name */
+/* Give users a hint in the help output for if they're trying to read MongoDB data files */
+static const char *mongodb_config = "log=(enabled=true,path=journal,compressor=snappy)";
+
#define READONLY "readonly=true"
#define REC_ERROR "log=(recover=error)"
#define REC_LOGOFF "log=(enabled=false)"
@@ -49,6 +52,7 @@ usage(void)
fprintf(stderr, "WiredTiger Data Engine (version %d.%d)\n", WIREDTIGER_VERSION_MAJOR,
WIREDTIGER_VERSION_MINOR);
+ fprintf(stderr, "MongoDB wiredtiger_open configuration: \"%s\"\n", mongodb_config);
util_usage(NULL, "global_options:", options);
util_usage(NULL, "commands:", commands);
}