summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-12-03 13:34:10 +1100
committerLuke Chen <luke.chen@mongodb.com>2018-12-03 13:34:10 +1100
commit19e5f8eb5ebac216373b121ba0d61b8a9d32ad03 (patch)
treeb4615efa509dc6ef171fc4b1e9ee6cd92f5810ad /src/third_party/wiredtiger
parentcf528c5f67177e9e84fafa064217f5f4e4be8a21 (diff)
downloadmongo-19e5f8eb5ebac216373b121ba0d61b8a9d32ad03.tar.gz
Import wiredtiger: b51da4ed903efd9daf4b9c04385f01bbb8d37d7d from branch mongodb-4.0
ref: 2ee0f0f4bb..b51da4ed90 for: 4.0.5 WT-3756 Adjust pre-allocated file amount downward if we're not using them quickly enough WT-4159 Improve log preallocation algorithm WT-4345 Set corruption and return salvage on facing a missing log file WT-4372 For throughput testing, create a standard metric to measure latency smoothness WT-4378 Create new auto functions and cursor for session level statistics WT-4381 Reset session statistics as on WT_SESSION::reset() WT-4394 Reduce Evergreen Ubuntu build variant runtime by splitting up 'make check' tests WT-4403 Add statistic tracking accumulated dirty cache WT-4405 Fix cursor next and prev for prepared transactions WT-4409 Fix workgen throttling WT-4419 big-endian machines incorrectly configure little-endian crc32c support WT-4427 Make WiredTiger timestamps always on and 8 bytes WT-4440 Force a copy of the stable timestamp for clarity
Diffstat (limited to 'src/third_party/wiredtiger')
-rwxr-xr-xsrc/third_party/wiredtiger/bench/workgen/latency_metric.py275
-rw-r--r--src/third_party/wiredtiger/bench/workgen/workgen.cxx44
-rw-r--r--src/third_party/wiredtiger/bench/workgen/workgen_int.h10
-rwxr-xr-xsrc/third_party/wiredtiger/bench/workgen/wtperf.py30
-rw-r--r--src/third_party/wiredtiger/build_posix/aclocal/options.m423
-rw-r--r--src/third_party/wiredtiger/build_win/wiredtiger_config.h6
-rwxr-xr-xsrc/third_party/wiredtiger/dist/s_typedef5
-rwxr-xr-xsrc/third_party/wiredtiger/dist/s_void1
-rw-r--r--src/third_party/wiredtiger/dist/stat.py61
-rw-r--r--src/third_party/wiredtiger/dist/stat_data.py79
-rw-r--r--src/third_party/wiredtiger/examples/c/ex_all.c6
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/lang/python/wiredtiger.i8
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_curnext.c57
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_curprev.c60
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_debug.c12
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_delete.c4
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_read.c14
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_split.c9
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_stat.c3
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_sync.c13
-rw-r--r--src/third_party/wiredtiger/src/btree/row_modify.c8
-rw-r--r--src/third_party/wiredtiger/src/cache/cache_las.c62
-rw-r--r--src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c7
-rw-r--r--src/third_party/wiredtiger/src/checksum/power8/crc32.sx7
-rw-r--r--src/third_party/wiredtiger/src/checksum/power8/crc32_wrapper.c7
-rw-r--r--src/third_party/wiredtiger/src/checksum/software/checksum.c1
-rw-r--r--src/third_party/wiredtiger/src/checksum/x86/crc32-x86.c7
-rw-r--r--src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c7
-rw-r--r--src/third_party/wiredtiger/src/checksum/zseries/crc32le-vx.sx7
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_cache.c2
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_log.c14
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_sweep.c2
-rw-r--r--src/third_party/wiredtiger/src/cursor/cur_stat.c41
-rw-r--r--src/third_party/wiredtiger/src/docs/transactions.dox21
-rw-r--r--src/third_party/wiredtiger/src/docs/upgrading.dox8
-rw-r--r--src/third_party/wiredtiger/src/evict/evict_lru.c2
-rw-r--r--src/third_party/wiredtiger/src/evict/evict_page.c4
-rw-r--r--src/third_party/wiredtiger/src/include/btmem.h26
-rw-r--r--src/third_party/wiredtiger/src/include/btree.h3
-rw-r--r--src/third_party/wiredtiger/src/include/btree.i19
-rw-r--r--src/third_party/wiredtiger/src/include/cache.h1
-rw-r--r--src/third_party/wiredtiger/src/include/cursor.h13
-rw-r--r--src/third_party/wiredtiger/src/include/cursor.i27
-rw-r--r--src/third_party/wiredtiger/src/include/extern.h9
-rw-r--r--src/third_party/wiredtiger/src/include/lsm.h2
-rw-r--r--src/third_party/wiredtiger/src/include/misc.h24
-rw-r--r--src/third_party/wiredtiger/src/include/misc.i4
-rw-r--r--src/third_party/wiredtiger/src/include/serial.i5
-rw-r--r--src/third_party/wiredtiger/src/include/session.h2
-rw-r--r--src/third_party/wiredtiger/src/include/stat.h16
-rw-r--r--src/third_party/wiredtiger/src/include/txn.h28
-rw-r--r--src/third_party/wiredtiger/src/include/txn.i237
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in891
-rw-r--r--src/third_party/wiredtiger/src/include/wt_internal.h7
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_cursor.c4
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_work_unit.c21
-rw-r--r--src/third_party/wiredtiger/src/meta/meta_ckpt.c9
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_write.c95
-rw-r--r--src/third_party/wiredtiger/src/session/session_api.c6
-rw-r--r--src/third_party/wiredtiger/src/support/stat.c45
-rw-r--r--src/third_party/wiredtiger/src/txn/txn.c166
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_ckpt.c51
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_ext.c2
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_nsnap.c15
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_recover.c37
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c63
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_timestamp.c470
-rw-r--r--src/third_party/wiredtiger/test/csuite/schema_abort/main.c17
-rw-r--r--src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c19
-rw-r--r--src/third_party/wiredtiger/test/evergreen.yml925
-rw-r--r--src/third_party/wiredtiger/test/mciproject.yml229
-rw-r--r--src/third_party/wiredtiger/test/suite/test_assert01.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_assert02.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_assert03.py7
-rw-r--r--src/third_party/wiredtiger/test/suite/test_assert04.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_backup08.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_bug019.py27
-rw-r--r--src/third_party/wiredtiger/test/suite/test_las01.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_las02.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_las03.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare01.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare02.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare03.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare04.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare05.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare_cursor01.py572
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare_lookaside01.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare_lookaside02.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_stat07.py84
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp01.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp02.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp03.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp04.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp05.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp06.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp07.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp08.py98
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp09.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp10.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp11.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp12.py3
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp13.py12
-rw-r--r--src/third_party/wiredtiger/test/suite/test_txn17.py9
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_txn19.py3
105 files changed, 3192 insertions, 2130 deletions
diff --git a/src/third_party/wiredtiger/bench/workgen/latency_metric.py b/src/third_party/wiredtiger/bench/workgen/latency_metric.py
new file mode 100755
index 00000000000..793ef5a0c59
--- /dev/null
+++ b/src/third_party/wiredtiger/bench/workgen/latency_metric.py
@@ -0,0 +1,275 @@
+#!/usr/bin/env python
+#
+# Public Domain 2014-2018 MongoDB, Inc.
+# Public Domain 2008-2014 WiredTiger, Inc.
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+
+# latency_metric.py
+# Print latency metrics for workgen runs that generate monitor.json
+import json, sys
+from datetime import datetime
+
+# A 'safe' divide shown as a string.
+def divide(a, b):
+ if b == 0.0:
+ if a == 0.0:
+ return '0.000 (no entries)'
+ else:
+ return 'infinite (divide by zero)'
+ else:
+ return '%.3f' % (float(a) / float(b))
+
+def value_as_str(self):
+ return '%.3f' % self.latency_average()
+
+# A collection of statastics that are related to a specific condition
+# during the run, for example during checkpoints or not during checkpoints.
+class Digest:
+ def __init__(self):
+ self.entries = 0
+ self.ops = 0
+ self.lat = 0
+ self.lat_99 = 0
+ self.lat_99_raw = 0
+ self.lat_max = 0
+ self.secs = 0.0
+
+ def entry(self, secs, ops, lat, lat_99, lat_max):
+ self.secs += secs
+ self.ops += ops
+ self.lat += lat * ops
+ self.lat_99_raw += lat_99
+ self.lat_99 += lat_99 * ops
+ if lat_max > self.lat_max:
+ self.lat_max = lat_max
+ self.entries += 1
+
+ def time_secs(self):
+ return self.secs
+
+ def latency_99_raw_average(self):
+ return float(self.lat_99_raw) / float(self.entries)
+
+ def latency_max(self):
+ return self.lat_max
+
+ def latency_average(self):
+ return float(self.lat) / float(self.ops)
+
+ def dump(self, prefix):
+ print(prefix + 'json entries: ' + str(self.entries))
+ print(prefix + 'operations: ' + str(self.ops))
+ print(prefix + 'total latency us: ' + str(self.lat))
+ print(prefix + 'latency 99% us, weighted sum: ' + str(self.lat_99))
+ print(prefix + 'latency 99% us, raw sum: ' + str(self.lat_99_raw))
+ print(prefix + 'latency max us: ' + str(self.lat_max))
+ print(prefix + 'elapsed secs: ' + str(self.secs))
+
+class Metric:
+ def __init__(self, name, desc):
+ self.name = name
+ self.desc = desc
+ self.value = 0.0
+
+ def set_value(self, value):
+ self.value = value
+
+# A set of latency metrics collected for a single run.
+# A user will see the short name, and if the script is run with the '--raw'
+# option, the elaborated description will also be shown.
+class FileMetrics:
+ def __init__(self, filename):
+ self.filename = filename
+ all = []
+
+ # This is the average latency for all read operations.
+ # Lower is better.
+ self.latency_avg = m = Metric('Average latency reads us',
+ 'total latency of read ops divided by operations')
+ all.append(m)
+
+ # This is the maximum latency over all read operations.
+ # Lower is better.
+ self.latency_max = m = Metric('Max latency reads us',
+ 'maximum of all read op latencies')
+ all.append(m)
+
+ # This is the ratio of the two previously reported numbers, latency_max
+ # and latency_avg.
+ #
+ # Lower is better (best is 1.0), it means more predictable response
+ # times.
+ self.ratio_max_avg = m = Metric('Max vs average latency',
+ 'ratio of maximum latency to average latency for read ops')
+ all.append(m)
+
+ # This is the ratio of 99% latency reads, checkpoint vs normal.
+ # That is, for all 1-second intervals that occur during a checkpoint,
+ # we take the 99 percentile latency for read operations, and average
+ # them, weighted by how many read operations were performed in each
+ # interval. We do the same for all 1-second intervals that occur
+ # outside of a checkpoint, and finally take the ratio between these
+ # two numbers. This is a more sophisticated measure of the smoothness
+ # of overall response times, looking at all latencies, rather than
+ # focusing on the one worst latency.
+ #
+ # Lower is better (best is 1.0), it means more predictable response
+ # times.
+ self.ratio_latency_99 = m = Metric('Checkpoint vs normal 99%',
+ 'ratio of the average of all 99% latency operations, ' +
+ 'during checkpoint times vs normal')
+ all.append(m)
+
+ # The proportion of time spent in a checkpoint
+ self.proportion_checkpoint_time = m = Metric('Proportion of ckpt time',
+ 'the proportion of time doing checkpoints')
+ all.append(m)
+ self.all_metrics = all
+ self.read_normal = None
+ self.read_ckpt = None
+ self.read_all = None
+
+ def calculate(self):
+ with open(self.filename) as f:
+ lines = f.readlines()
+ s = '{ "ts" : [' + ','.join(lines) + '] }'
+ json_data = json.loads(s)
+ self.calculate_using_json(json_data)
+
+ def calculate_using_json(self, json_data):
+ ckpt_in_progress = False
+ ckpt_count = 0
+ prev_dt = None
+ # We digest the latency stats during 'normal' (non-checkpoint) times
+ # and also during checkpoint times.
+ self.read_normal = Digest()
+ self.read_ckpt = Digest()
+ self.read_all = Digest()
+ for entry in json_data['ts']:
+ time_s = entry['localTime']
+ dt = datetime.strptime(time_s, '%Y-%m-%dT%H:%M:%S.%fZ')
+ is_ckpt = entry['workgen']['checkpoint']['active'] > 0
+ if not ckpt_in_progress and is_ckpt:
+ ckpt_count += 1
+ ckpt_in_progress = is_ckpt
+
+ # In the first entry, we don't have an elapsed time, so
+ # we'll ignore its data.
+ if prev_dt != None:
+ timediff = dt - prev_dt
+ seconds = timediff.total_seconds()
+ if seconds <= 0.0:
+ raise Exception('invalid time span between entries')
+ if is_ckpt:
+ digest = self.read_ckpt
+ else:
+ digest = self.read_normal
+ rentry = entry['workgen']['read']
+ ops = rentry['ops per sec'] * seconds
+ lat_avg = rentry['average latency']
+ lat_99 = rentry['99% latency']
+ lat_max = rentry['max latency']
+ digest.entry(seconds, ops, lat_avg, lat_99, lat_max)
+ self.read_all.entry(seconds, ops, lat_avg, lat_99, lat_max)
+ prev_dt = dt
+ if self.read_all.time_secs() == 0.0:
+ raise(Exception(self.filename +
+ ': no entries, or no time elapsed'))
+ if self.read_normal.entries == 0 or self.read_normal.ops == 0:
+ raise(Exception(self.filename +
+ ': no operations or entries during non-checkpoint time period'))
+ if self.read_ckpt.entries == 0 or self.read_ckpt.ops == 0:
+ raise(Exception(self.filename +
+ ': no operations or entries during checkpoint'))
+ if ckpt_count < 2:
+ raise(Exception(self.filename +
+ ': need at least 2 checkpoints started'))
+
+ self.latency_avg.set_value(self.read_all.latency_average())
+ self.latency_max.set_value(self.read_all.latency_max())
+ self.ratio_max_avg.set_value(
+ float(self.read_all.latency_max()) /
+ float(self.read_all.latency_average()))
+ self.ratio_latency_99.set_value(
+ self.read_ckpt.latency_99_raw_average() /
+ self.read_normal.latency_99_raw_average())
+ self.proportion_checkpoint_time.set_value(
+ self.read_ckpt.time_secs() /
+ self.read_all.time_secs())
+
+def table_line(leftcol, cols, spacer):
+ return leftcol + spacer + spacer.join(cols) + '\n'
+
+def make_len(value, l):
+ return ('%%%ds' % l) % str(value)
+
+def value_format(value):
+ return '%.3f' % value
+
+fmlist = []
+raw = False
+for arg in sys.argv[1:]:
+ if arg == '--raw':
+ raw = True
+ else:
+ fm = FileMetrics(arg)
+ fm.calculate()
+ fmlist.append(fm)
+
+leftlen = 25
+collen = 20
+filecount = len(fmlist)
+dashes = '-' * leftlen, []
+if filecount == 0:
+ print('Usage: python latency_metric.py [ --raw ] file.json...')
+ print(' input files are typically monitor.json files produced by workgen')
+else:
+ out = ''
+ cols = [make_len(fm.filename, collen) for fm in fmlist]
+ out += table_line(' ' * leftlen, cols, ' | ')
+ cols = ['-' * collen for fm in fmlist]
+ out += table_line('-' * leftlen, cols, '-+-')
+ pos = 0
+ for m in fmlist[0].all_metrics:
+ cols = [make_len(value_format(fm.all_metrics[pos].value), collen) \
+ for fm in fmlist]
+ out += table_line(make_len(m.name, leftlen), cols, ' | ')
+ pos += 1
+
+ print(out)
+
+if raw:
+ for fm in fmlist:
+ print('file: ' + fm.filename)
+ print(' digested metrics collected for reads during non-checkpoints:')
+ fm.read_normal.dump(' ')
+ print(' digested metrics collected for reads during checkpoints:')
+ fm.read_ckpt.dump(' ')
+ print('')
+ for m in fm.all_metrics:
+ print(' ' + m.name + ' (' + m.desc + '): ' + str(m.value))
+ print('\nSee ' + __file__ +
+ ' for a more detailed description of each metric.')
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen.cxx b/src/third_party/wiredtiger/bench/workgen/workgen.cxx
index 4eb2909c819..64af7258325 100644
--- a/src/third_party/wiredtiger/bench/workgen/workgen.cxx
+++ b/src/third_party/wiredtiger/bench/workgen/workgen.cxx
@@ -715,10 +715,15 @@ int ThreadRunner::op_run(Operation *op) {
retry_op = true;
range = op->_table.options.range;
if (_throttle != NULL) {
- if (_throttle_ops >= _throttle_limit && !_in_transaction) {
- WT_ERR(_throttle->throttle(_throttle_ops,
- &_throttle_limit));
+ while (_throttle_ops >= _throttle_limit && !_in_transaction && !_stop) {
+ // Calling throttle causes a sleep until the next time division,
+ // and we are given a new batch of operations to do before calling
+ // throttle again. If the number of operations in the batch is
+ // zero, we'll need to go around and throttle again.
+ WT_ERR(_throttle->throttle(_throttle_ops, &_throttle_limit));
_throttle_ops = 0;
+ if (_throttle_limit != 0)
+ break;
}
if (op->is_table_op())
++_throttle_ops;
@@ -901,9 +906,18 @@ float ThreadRunner::random_signed() {
Throttle::Throttle(ThreadRunner &runner, double throttle,
double throttle_burst) : _runner(runner), _throttle(throttle),
_burst(throttle_burst), _next_div(), _ops_delta(0), _ops_prev(0),
- _ops_per_div(0), _ms_per_div(0), _started(false) {
+ _ops_per_div(0), _ms_per_div(0), _ops_left_this_second(throttle),
+ _div_pos(0), _started(false) {
+
+ // Our throttling is done by dividing each second into THROTTLE_PER_SEC
+ // parts (we call the parts divisions). In each division, we perform
+ // a certain number of operations. This number is approximately
+ // throttle/THROTTLE_PER_SEC, except that throttle is not necessarily
+ // a multiple of THROTTLE_PER_SEC, nor is it even necessarily an integer.
+ // (That way we can have 1000 threads each inserting 0.5 a second).
ts_clear(_next_div);
- _ms_per_div = (uint64_t)ceill(1000.0 / THROTTLE_PER_SEC);
+ ASSERT(1000 % THROTTLE_PER_SEC == 0); // must evenly divide
+ _ms_per_div = 1000 / THROTTLE_PER_SEC;
_ops_per_div = (uint64_t)ceill(_throttle / THROTTLE_PER_SEC);
}
@@ -914,8 +928,9 @@ Throttle::~Throttle() {}
// initially to the current time + 1/THROTTLE_PER_SEC. Each call to throttle
// advances _next_div by 1/THROTTLE_PER_SEC, and if _next_div is in the future,
// we sleep for the difference between the _next_div and the current_time. We
-// always return (Thread.options.throttle / THROTTLE_PER_SEC) as the number of
-// operations.
+// we return (Thread.options.throttle / THROTTLE_PER_SEC) as the number of
+// operations, if it does not divide evenly, we'll make sure to not exceed
+// the number of operations requested per second.
//
// The only variation is that the amount of individual sleeps is modified by a
// random amount (which varies more widely as Thread.options.throttle_burst is
@@ -934,6 +949,8 @@ int Throttle::throttle(uint64_t op_count, uint64_t *op_limit) {
_started = true;
} else {
_ops_delta += (op_count - _ops_prev);
+
+ // Sleep until the next division, but potentially with some randomness.
if (now < _next_div) {
sleep_ms = ts_ms(_next_div - now);
sleep_ms += (_ms_per_div * _burst * _runner.random_signed());
@@ -952,8 +969,21 @@ int Throttle::throttle(uint64_t op_count, uint64_t *op_limit) {
_ops_delta -= ops;
ops = 0;
}
+
+ // Enforce that we haven't exceeded the number of operations this second.
+ // Note that _ops_left_this_second may be fractional.
+ if (ops > _ops_left_this_second)
+ ops = (uint64_t)floorl(_ops_left_this_second);
+ _ops_left_this_second -= ops;
+ ASSERT(_ops_left_this_second >= 0.0);
*op_limit = ops;
_ops_prev = ops;
+
+ // Advance the division, and if we pass into a new second, allocate
+ // more operations into the count of operations left this second.
+ _div_pos = (_div_pos + 1) % THROTTLE_PER_SEC;
+ if (_div_pos == 0)
+ _ops_left_this_second += _throttle;
DEBUG_CAPTURE(_runner, ", return=" << ops << std::endl);
return (0);
}
diff --git a/src/third_party/wiredtiger/bench/workgen/workgen_int.h b/src/third_party/wiredtiger/bench/workgen/workgen_int.h
index 95cdef4fdab..20228f67d06 100644
--- a/src/third_party/wiredtiger/bench/workgen/workgen_int.h
+++ b/src/third_party/wiredtiger/bench/workgen/workgen_int.h
@@ -67,13 +67,15 @@ struct WorkgenException {
struct Throttle {
ThreadRunner &_runner;
- double _throttle;
+ double _throttle; // operations per second
double _burst;
timespec _next_div;
int64_t _ops_delta;
- uint64_t _ops_prev; // previously returned value
- uint64_t _ops_per_div; // statically calculated.
- uint64_t _ms_per_div; // statically calculated.
+ uint64_t _ops_prev; // previously returned value
+ uint64_t _ops_per_div; // statically calculated.
+ uint64_t _ms_per_div; // statically calculated.
+ double _ops_left_this_second; // ops left to go this second
+ uint_t _div_pos; // count within THROTTLE_PER_SEC
bool _started;
Throttle(ThreadRunner &runner, double throttle, double burst);
diff --git a/src/third_party/wiredtiger/bench/workgen/wtperf.py b/src/third_party/wiredtiger/bench/workgen/wtperf.py
index 84ae126feac..0b7b41a7591 100755
--- a/src/third_party/wiredtiger/bench/workgen/wtperf.py
+++ b/src/third_party/wiredtiger/bench/workgen/wtperf.py
@@ -214,23 +214,23 @@ class Translator:
# Wtperf's throttle is based on the number of regular operations,
# not including log_like operations. Workgen counts all operations,
- # it doesn't treat log operations any differently. Adjust the throttle
- # number to account for the difference.
+ # it doesn't treat log operations any differently.
def calc_throttle(self, thread_opts, log_like_table):
throttle = thread_opts.throttle
- if not log_like_table:
- return (throttle, '')
- modify = thread_opts.inserts + thread_opts.updates
- regular = modify + thread_opts.reads
- total = regular + modify
- factor = (total + 0.0) / regular
- new_throttle = int(throttle * factor)
- if new_throttle == throttle:
- comment = ''
- else:
- comment = '# wtperf throttle=' + str(throttle) + ' adjusted by ' + \
- str(factor) + ' to compensate for log_like operations.\n'
- return (new_throttle, comment)
+ comment = ''
+ factor = 1.0
+ if log_like_table:
+ modify = thread_opts.inserts + thread_opts.updates
+ regular = modify + thread_opts.reads
+ total = regular + modify
+ factor = (total + 0.0) / regular
+ if factor != 1.0:
+ comment = \
+ '# These operations include log_like operations, which ' + \
+ 'will increase the number\n# of insert/update operations ' + \
+ 'by a factor of ' + str(factor) + '. This may cause the\n' + \
+ '# actual operations performed to be above the throttle.\n'
+ return (throttle, comment)
def parse_threads(self, threads_config, checkpoint_threads):
opts = self.options
diff --git a/src/third_party/wiredtiger/build_posix/aclocal/options.m4 b/src/third_party/wiredtiger/build_posix/aclocal/options.m4
index 9d07958bad9..47655ba82cb 100644
--- a/src/third_party/wiredtiger/build_posix/aclocal/options.m4
+++ b/src/third_party/wiredtiger/build_posix/aclocal/options.m4
@@ -231,15 +231,6 @@ no) wt_cv_enable_strict=no;;
esac
AC_MSG_RESULT($wt_cv_enable_strict)
-AC_MSG_CHECKING(if --with-timestamp-size option specified)
-AC_ARG_WITH(timestamp-size,
- [AS_HELP_STRING([--with-timestamp-size=NUM],
- [Size of transaction timestamps in bytes, default 8.])],
- [with_timestamp_size=$withval],
- [with_timestamp_size=8])
-AC_MSG_RESULT($with_timestamp_size)
-AC_DEFINE_UNQUOTED(WT_TIMESTAMP_SIZE, [$with_timestamp_size], [Size of a transaction timestamp in bytes])
-
AC_MSG_CHECKING(if --enable-zlib option specified)
AC_ARG_ENABLE(zlib,
[AS_HELP_STRING([--enable-zlib],
@@ -292,4 +283,18 @@ if test "$wt_cv_enable_zstd" = "yes"; then
fi
AM_CONDITIONAL([ZSTD], [test "$wt_cv_enable_zstd" = "yes"])
+AH_TEMPLATE(HAVE_NO_CRC32_HARDWARE,
+ [Define to 1 to disable any crc32 hardware support.])
+AC_MSG_CHECKING(if --disable-crc32-hardware option specified)
+AC_ARG_ENABLE(crc32-hardware,
+ [AS_HELP_STRING([--disable-crc32-hardware],
+ [Disable any crc32 hardware support.])], r=$enableval, r=yes)
+case "$r" in
+no) wt_cv_crc32_hardware=no
+ AC_DEFINE(HAVE_NO_CRC32_HARDWARE)
+ AC_MSG_RESULT(yes);;
+*) wt_cv_crc32_hardware=yes
+ AC_MSG_RESULT(no);;
+esac
+
])
diff --git a/src/third_party/wiredtiger/build_win/wiredtiger_config.h b/src/third_party/wiredtiger/build_win/wiredtiger_config.h
index bb4cc7848f8..6c803748f7b 100644
--- a/src/third_party/wiredtiger/build_win/wiredtiger_config.h
+++ b/src/third_party/wiredtiger/build_win/wiredtiger_config.h
@@ -76,6 +76,9 @@
/* Define to 1 if you have the <memory.h> header file. */
/* #undef HAVE_MEMORY_H */
+/* Define to 1 to disable any crc32 hardware support. */
+/* #undef HAVE_NO_CRC32_HARDWARE */
+
/* Define to 1 if pthread condition variables support monotonic clocks. */
/* #undef HAVE_PTHREAD_COND_MONOTONIC */
@@ -130,9 +133,6 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Size of a transaction timestamp in bytes */
-#define WT_TIMESTAMP_SIZE 8
-
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
diff --git a/src/third_party/wiredtiger/dist/s_typedef b/src/third_party/wiredtiger/dist/s_typedef
index d4bcda94e74..87b488fc3c9 100755
--- a/src/third_party/wiredtiger/dist/s_typedef
+++ b/src/third_party/wiredtiger/dist/s_typedef
@@ -32,6 +32,11 @@ build() {
echo " typedef $t $n $upper;"
done
+ # There's one fixed type we use.
+ echo
+ echo 'typedef uint64_t wt_timestamp_t;'
+ echo
+
echo '/*'
sed -e '/Forward type declarations .*: END/,${' \
-e 'p' \
diff --git a/src/third_party/wiredtiger/dist/s_void b/src/third_party/wiredtiger/dist/s_void
index 8798893597d..6c2b8b34040 100755
--- a/src/third_party/wiredtiger/dist/s_void
+++ b/src/third_party/wiredtiger/dist/s_void
@@ -72,6 +72,7 @@ func_ok()
-e '/int __wt_stat_connection_desc$/d' \
-e '/int __wt_stat_dsrc_desc$/d' \
-e '/int __wt_stat_join_desc$/d' \
+ -e '/int __wt_stat_session_desc/d' \
-e '/int __wt_txn_rollback_required$/d' \
-e '/int __wt_win_directory_list_free$/d' \
-e '/int bdb_compare_reverse$/d' \
diff --git a/src/third_party/wiredtiger/dist/stat.py b/src/third_party/wiredtiger/dist/stat.py
index bb9048395e1..dfea67d8e21 100644
--- a/src/third_party/wiredtiger/dist/stat.py
+++ b/src/third_party/wiredtiger/dist/stat.py
@@ -5,7 +5,8 @@ import re, string, sys, textwrap
from dist import compare_srcfile
# Read the source files.
-from stat_data import groups, dsrc_stats, connection_stats, join_stats
+from stat_data import groups, dsrc_stats, connection_stats, join_stats, \
+ session_stats
def print_struct(title, name, base, stats):
'''Print the structures for the stat.h file.'''
@@ -36,6 +37,7 @@ for line in open('../src/include/stat.h', 'r'):
'connections', 'connection', 1000, connection_stats)
print_struct('data sources', 'dsrc', 2000, dsrc_stats)
print_struct('join cursors', 'join', 3000, join_stats)
+ print_struct('session', 'session', 4000, session_stats)
f.close()
compare_srcfile(tmp_file, '../src/include/stat.h')
@@ -90,6 +92,15 @@ def print_defines():
*/
''')
print_defines_one('JOIN', 3000, join_stats)
+ f.write('''
+/*!
+ * @}
+ * @name Statistics for session
+ * @anchor statistics_session
+ * @{
+ */
+''')
+ print_defines_one('SESSION', 4000, session_stats)
f.write('/*! @} */\n')
# Update the #defines in the wiredtiger.in file.
@@ -175,7 +186,8 @@ __wt_stat_''' + name + '_clear_single(WT_' + name.upper() + '''_STATS *stats)
f.write('\tstats->' + l.name + ' = 0;\n')
f.write('}\n')
- f.write('''
+ if name != 'session':
+ f.write('''
void
__wt_stat_''' + name + '_clear_all(WT_' + name.upper() + '''_STATS **stats)
{
@@ -205,32 +217,34 @@ __wt_stat_''' + name + '''_aggregate_single(
f.write(o)
f.write('}\n')
- f.write('''
+ if name != 'session':
+ f.write('''
void
__wt_stat_''' + name + '''_aggregate(
WT_''' + name.upper() + '_STATS **from, WT_' + name.upper() + '''_STATS *to)
{
''')
- # Connection level aggregation does not currently have any computation
- # of a maximum value; I'm leaving in support for it, but don't declare
- # a temporary variable until it's needed.
- for l in statlist:
- if 'max_aggregate' in l.flags:
- f.write('\tint64_t v;\n\n')
- break;
- for l in statlist:
- if 'max_aggregate' in l.flags:
- o = '\tif ((v = WT_STAT_READ(from, ' + l.name + ')) > ' +\
- 'to->' + l.name + ')\n'
- if len(o) > 72: # Account for the leading tab.
- o = o.replace(' > ', ' >\n\t ')
- o +='\t\tto->' + l.name + ' = v;\n'
- else:
- o = '\tto->' + l.name + ' += WT_STAT_READ(from, ' + l.name + ');\n'
- if len(o) > 72: # Account for the leading tab.
- o = o.replace(' += ', ' +=\n\t ')
- f.write(o)
- f.write('}\n')
+ # Connection level aggregation does not currently have any computation
+ # of a maximum value; I'm leaving in support for it, but don't declare
+ # a temporary variable until it's needed.
+ for l in statlist:
+ if 'max_aggregate' in l.flags:
+ f.write('\tint64_t v;\n\n')
+ break;
+ for l in statlist:
+ if 'max_aggregate' in l.flags:
+ o = '\tif ((v = WT_STAT_READ(from, ' + l.name + ')) > ' +\
+ 'to->' + l.name + ')\n'
+ if len(o) > 72: # Account for the leading tab.
+ o = o.replace(' > ', ' >\n\t ')
+ o +='\t\tto->' + l.name + ' = v;\n'
+ else:
+ o = '\tto->' + l.name + ' += WT_STAT_READ(from, ' + l.name +\
+ ');\n'
+ if len(o) > 72: # Account for the leading tab.
+ o = o.replace(' += ', ' +=\n\t ')
+ f.write(o)
+ f.write('}\n')
# Write the stat initialization and refresh routines to the stat.c file.
f = open(tmp_file, 'w')
@@ -240,5 +254,6 @@ f.write('#include "wt_internal.h"\n')
print_func('dsrc', 'WT_DATA_HANDLE', dsrc_stats)
print_func('connection', 'WT_CONNECTION_IMPL', connection_stats)
print_func('join', None, join_stats)
+print_func('session', None, session_stats)
f.close()
compare_srcfile(tmp_file, '../src/support/stat.c')
diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py
index d6c89c1af70..e4e56194040 100644
--- a/src/third_party/wiredtiger/dist/stat_data.py
+++ b/src/third_party/wiredtiger/dist/stat_data.py
@@ -84,6 +84,10 @@ class LSMStat(Stat):
prefix = 'LSM'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, LSMStat.prefix, desc, flags)
+class SessionStat(Stat):
+ prefix = 'session'
+ def __init__(self, name, desc, flags=''):
+ Stat.__init__(self, name, SessionStat.prefix, desc, flags)
class PerfHistStat(Stat):
prefix = 'perf'
def __init__(self, name, desc, flags=''):
@@ -92,10 +96,10 @@ class RecStat(Stat):
prefix = 'reconciliation'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, RecStat.prefix, desc, flags)
-class SessionStat(Stat):
+class SessionOpStat(Stat):
prefix = 'session'
def __init__(self, name, desc, flags=''):
- Stat.__init__(self, name, SessionStat.prefix, desc, flags)
+ Stat.__init__(self, name, SessionOpStat.prefix, desc, flags)
class ThreadStat(Stat):
prefix = 'thread-state'
def __init__(self, name, desc, flags=''):
@@ -115,7 +119,7 @@ class YieldStat(Stat):
# list of prefix tags that comprise that group.
##########################################
groups = {}
-groups['cursor'] = [CursorStat.prefix, SessionStat.prefix]
+groups['cursor'] = [CursorStat.prefix, SessionOpStat.prefix]
groups['evict'] = [
BlockStat.prefix,
CacheStat.prefix,
@@ -133,7 +137,7 @@ groups['system'] = [
ConnStat.prefix,
DhandleStat.prefix,
PerfHistStat.prefix,
- SessionStat.prefix,
+ SessionOpStat.prefix,
ThreadStat.prefix
]
@@ -191,6 +195,7 @@ connection_stats = [
# Cache and eviction statistics
##########################################
CacheStat('cache_bytes_dirty', 'tracked dirty bytes in the cache', 'no_clear,no_scale,size'),
+ CacheStat('cache_bytes_dirty_total', 'bytes dirty in the cache cumulative', 'no_clear,no_scale,size'),
CacheStat('cache_bytes_image', 'bytes belonging to page images in the cache', 'no_clear,no_scale,size'),
CacheStat('cache_bytes_internal', 'tracked bytes belonging to internal pages in the cache', 'no_clear,no_scale,size'),
CacheStat('cache_bytes_inuse', 'bytes currently in the cache', 'no_clear,no_scale,size'),
@@ -464,28 +469,28 @@ connection_stats = [
##########################################
# Session operations
##########################################
- SessionStat('session_cursor_open', 'open cursor count', 'no_clear,no_scale'),
- SessionStat('session_open', 'open session count', 'no_clear,no_scale'),
- SessionStat('session_query_ts', 'session query timestamp calls'),
- SessionStat('session_table_alter_fail', 'table alter failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_alter_skip', 'table alter unchanged and skipped', 'no_clear,no_scale'),
- SessionStat('session_table_alter_success', 'table alter successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_compact_fail', 'table compact failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_compact_success', 'table compact successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_create_fail', 'table create failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_create_success', 'table create successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_drop_fail', 'table drop failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_drop_success', 'table drop successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_rebalance_fail', 'table rebalance failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_rebalance_success', 'table rebalance successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_rename_fail', 'table rename failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_rename_success', 'table rename successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_salvage_fail', 'table salvage failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_salvage_success', 'table salvage successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_truncate_fail', 'table truncate failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_truncate_success', 'table truncate successful calls', 'no_clear,no_scale'),
- SessionStat('session_table_verify_fail', 'table verify failed calls', 'no_clear,no_scale'),
- SessionStat('session_table_verify_success', 'table verify successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_cursor_open', 'open cursor count', 'no_clear,no_scale'),
+ SessionOpStat('session_open', 'open session count', 'no_clear,no_scale'),
+ SessionOpStat('session_query_ts', 'session query timestamp calls'),
+ SessionOpStat('session_table_alter_fail', 'table alter failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_alter_skip', 'table alter unchanged and skipped', 'no_clear,no_scale'),
+ SessionOpStat('session_table_alter_success', 'table alter successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_compact_fail', 'table compact failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_compact_success', 'table compact successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_create_fail', 'table create failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_create_success', 'table create successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_drop_fail', 'table drop failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_drop_success', 'table drop successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_rebalance_fail', 'table rebalance failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_rebalance_success', 'table rebalance successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_rename_fail', 'table rename failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_rename_success', 'table rename successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_salvage_fail', 'table salvage failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_salvage_success', 'table salvage successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_truncate_fail', 'table truncate failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_truncate_success', 'table truncate successful calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_verify_fail', 'table verify failed calls', 'no_clear,no_scale'),
+ SessionOpStat('session_table_verify_success', 'table verify successful calls', 'no_clear,no_scale'),
##########################################
# Thread Count statistics
@@ -618,6 +623,7 @@ dsrc_stats = [
# Cache and eviction statistics
##########################################
CacheStat('cache_bytes_dirty', 'tracked dirty bytes in the cache', 'no_clear,no_scale,size'),
+ CacheStat('cache_bytes_dirty_total', 'bytes dirty in the cache cumulative', 'no_clear,no_scale,size'),
CacheStat('cache_bytes_inuse', 'bytes currently in the cache', 'no_clear,no_scale,size'),
CacheStat('cache_bytes_read', 'bytes read into cache', 'size'),
CacheStat('cache_bytes_write', 'bytes written from cache', 'size'),
@@ -752,9 +758,9 @@ dsrc_stats = [
##########################################
# Session operations
##########################################
- SessionStat('session_compact', 'object compaction'),
- SessionStat('session_cursors_cached', 'cached cursor count', 'no_clear,no_scale'),
- SessionStat('session_cursor_open', 'open cursor count', 'no_clear,no_scale'),
+ SessionOpStat('session_compact', 'object compaction'),
+ SessionOpStat('session_cursors_cached', 'cached cursor count', 'no_clear,no_scale'),
+ SessionOpStat('session_cursor_open', 'open cursor count', 'no_clear,no_scale'),
##########################################
# Transaction statistics
@@ -776,3 +782,18 @@ join_stats = [
]
join_stats = sorted(join_stats, key=attrgetter('desc'))
+
+##########################################
+# Session statistics
+##########################################
+session_stats = [
+ SessionStat('bytes_read', 'bytes read into cache'),
+ SessionStat('bytes_write', 'bytes written from cache'),
+ SessionStat('cache_time', 'time waiting for cache (usecs)'),
+ SessionStat('lock_dhandle_wait', 'dhandle lock wait time (usecs)'),
+ SessionStat('lock_schema_wait', 'schema lock wait time (usecs)'),
+ SessionStat('read_time', 'page read from disk to cache time (usecs)'),
+ SessionStat('write_time', 'page write from cache to disk time (usecs)'),
+]
+
+session_stats = sorted(session_stats, key=attrgetter('desc'))
diff --git a/src/third_party/wiredtiger/examples/c/ex_all.c b/src/third_party/wiredtiger/examples/c/ex_all.c
index 6b2976f11c3..fe6bf86804b 100644
--- a/src/third_party/wiredtiger/examples/c/ex_all.c
+++ b/src/third_party/wiredtiger/examples/c/ex_all.c
@@ -901,7 +901,6 @@ transaction_ops(WT_SESSION *session_arg)
error_check(session->commit_transaction(session, NULL));
/*! [transaction isolation] */
-#ifdef HAVE_TIMESTAMPS
{
/*! [transaction prepare] */
/*
@@ -920,7 +919,6 @@ transaction_ops(WT_SESSION *session_arg)
session, "commit_timestamp=2b"));
/*! [transaction prepare] */
}
-#endif
/*! [session isolation configuration] */
/* Open a session configured for read-uncommitted isolation. */
@@ -947,10 +945,9 @@ transaction_ops(WT_SESSION *session_arg)
error_check(session->begin_transaction(session, NULL));
-#ifdef HAVE_TIMESTAMPS
{
/*! [query timestamp] */
- char timestamp_buf[2 * WT_TIMESTAMP_SIZE + 1];
+ char timestamp_buf[2 * sizeof(uint64_t) + 1];
/*! [transaction timestamp] */
error_check(
@@ -979,7 +976,6 @@ transaction_ops(WT_SESSION *session_arg)
/*! [rollback to stable] */
error_check(conn->rollback_to_stable(conn, NULL));
/*! [rollback to stable] */
-#endif
}
/*! [Implement WT_COLLATOR] */
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index bd7309a1a52..516c9a2d684 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -1,5 +1,5 @@
{
- "commit": "2ee0f0f4bbfdc7133ec87986006be17a7494aa08",
+ "commit": "b51da4ed903efd9daf4b9c04385f01bbb8d37d7d",
"github": "wiredtiger/wiredtiger.git",
"vendor": "wiredtiger",
"branch": "mongodb-4.0"
diff --git a/src/third_party/wiredtiger/lang/python/wiredtiger.i b/src/third_party/wiredtiger/lang/python/wiredtiger.i
index 0c95be87c1b..9ba6bd15c78 100644
--- a/src/third_party/wiredtiger/lang/python/wiredtiger.i
+++ b/src/third_party/wiredtiger/lang/python/wiredtiger.i
@@ -510,7 +510,6 @@ COMPARE_NOTFOUND_OK(__wt_cursor::_search_near)
%exception wiredtiger_strerror;
%exception wiredtiger_version;
%exception diagnostic_build;
-%exception timestamp_build;
/* WT_ASYNC_OP customization. */
/* First, replace the varargs get / set methods with Python equivalents. */
@@ -558,7 +557,7 @@ OVERRIDE_METHOD(__wt_cursor, WT_CURSOR, search_near, (self))
%typemap(argout) (uint64_t *recnop) { $result = PyLong_FromUnsignedLongLong(*$1); }
/* Handle returned hexadecimal timestamps. */
-%typemap(in,numinputs=0) (char *hex_timestamp) (char tsbuf[2 * WT_TIMESTAMP_SIZE + 1]) { $1 = tsbuf; }
+%typemap(in,numinputs=0) (char *hex_timestamp) (char tsbuf[WT_TS_HEX_SIZE]) { $1 = tsbuf; }
%typemap(argout) (char *hex_timestamp) {
if (*$1)
$result = SWIG_FromCharPtr($1);
@@ -1008,13 +1007,8 @@ int diagnostic_build() {
return 0;
#endif
}
-
-int timestamp_build() {
- return WT_TIMESTAMP_SIZE > 0;
-}
%}
int diagnostic_build();
-int timestamp_build();
/* Remove / rename parts of the C API that we don't want in Python. */
%immutable __wt_cursor::session;
diff --git a/src/third_party/wiredtiger/src/btree/bt_curnext.c b/src/third_party/wiredtiger/src/btree/bt_curnext.c
index f5797888d6b..05dd7c70cc0 100644
--- a/src/third_party/wiredtiger/src/btree/bt_curnext.c
+++ b/src/third_party/wiredtiger/src/btree/bt_curnext.c
@@ -582,9 +582,8 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating)
WT_DECL_RET;
WT_PAGE *page;
WT_SESSION_IMPL *session;
- WT_UPDATE *upd;
uint32_t flags;
- bool newpage, valid;
+ bool newpage, visible;
cursor = &cbt->iface;
session = (WT_SESSION_IMPL *)cbt->iface.session;
@@ -595,32 +594,19 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating)
F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
/*
- * When retrying an operation due to a prepare conflict, the cursor is
- * is at an update list which resulted in conflict. So, when retrying
- * we should examine the same update again instead of iterating to the
- * next object. We'll eventually find a valid update, return prepare-
- * conflict until successful.
+ * If this cursor has returned prepare conflict earlier, check to see
+ * whether that prepared update is resolved or not. If not resolved,
+ * continue returning prepare conflict. If resolved, return the value
+ * based on the visibility rules.
*/
- F_CLR(cbt, WT_CBT_RETRY_PREV);
- if (F_ISSET(cbt, WT_CBT_RETRY_NEXT)) {
- WT_ERR(__wt_cursor_valid(cbt, &upd, &valid));
- if (!valid)
- WT_ERR(WT_PREPARE_CONFLICT);
-
- /* The update that returned prepared conflict is now visible. */
- F_CLR(cbt, WT_CBT_RETRY_NEXT);
-
- /*
- * The underlying key-return function uses a comparison value
- * of 0 to indicate the search function has pre-built the key
- * we want to return. That's not the case, don't take that path.
- */
- cbt->compare = 1;
- WT_ERR(__cursor_kv_return(session, cbt, upd));
+ if (F_ISSET(cbt, WT_CBT_ITERATE_RETRY_NEXT)) {
+ WT_ERR(__cursor_check_prepared_update(cbt, &visible));
+ if (visible) {
#ifdef HAVE_DIAGNOSTIC
- WT_ERR(__wt_cursor_key_order_check(session, cbt, true));
+ WT_ERR(__wt_cursor_key_order_check(session, cbt, true));
#endif
- return (0);
+ return (0);
+ }
}
WT_ERR(__cursor_func_init(cbt, false));
@@ -653,7 +639,7 @@ __wt_btcur_next(WT_CURSOR_BTREE *cbt, bool truncating)
break;
WT_ILLEGAL_VALUE_ERR(session, page->type);
}
- if (ret == 0)
+ if (ret == 0 || ret == WT_PREPARE_CONFLICT)
break;
F_CLR(cbt, WT_CBT_ITERATE_APPEND);
if (ret != WT_NOTFOUND)
@@ -710,7 +696,21 @@ err: switch (ret) {
case 0:
F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT);
#ifdef HAVE_DIAGNOSTIC
- ret = __wt_cursor_key_order_check(session, cbt, true);
+ /*
+ * Skip key order check, if prev is called after a next returned
+ * a prepare conflict error, i.e cursor has changed direction
+ * at a prepared update, hence current key returned could be
+ * same as earlier returned key.
+ *
+ * eg: Initial data set : {1,2,3,...10)
+ * insert key 11 in a prepare transaction.
+ * loop on next will return 1,2,3...10 and subsequent call to
+ * next will return a prepare conflict. Now if we call prev
+ * key 10 will be returned which will be same as earlier
+ * returned key.
+ */
+ if (!F_ISSET(cbt, WT_CBT_ITERATE_RETRY_PREV))
+ ret = __wt_cursor_key_order_check(session, cbt, true);
#endif
break;
case WT_PREPARE_CONFLICT:
@@ -719,10 +719,11 @@ err: switch (ret) {
* as current cursor position will be reused in case of a
* retry from user.
*/
- F_SET(cbt, WT_CBT_RETRY_NEXT);
+ F_SET(cbt, WT_CBT_ITERATE_RETRY_NEXT);
break;
default:
WT_TRET(__cursor_reset(cbt));
}
+ F_CLR(cbt, WT_CBT_ITERATE_RETRY_PREV);
return (ret);
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_curprev.c b/src/third_party/wiredtiger/src/btree/bt_curprev.c
index 75f25ee874d..553c7ca81c2 100644
--- a/src/third_party/wiredtiger/src/btree/bt_curprev.c
+++ b/src/third_party/wiredtiger/src/btree/bt_curprev.c
@@ -536,9 +536,8 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating)
WT_DECL_RET;
WT_PAGE *page;
WT_SESSION_IMPL *session;
- WT_UPDATE *upd;
uint32_t flags;
- bool newpage, valid;
+ bool newpage, visible;
cursor = &cbt->iface;
session = (WT_SESSION_IMPL *)cbt->iface.session;
@@ -549,34 +548,20 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating)
F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
/*
- * When retrying an operation due to a prepare conflict, the cursor is
- * is at an update list which resulted in conflict. So, when retrying
- * we should examine the same update again instead of iterating to the
- * next object. We'll eventually find a valid update, return prepare-
- * conflict until successful.
+ * If this cursor has returned prepare conflict earlier, check to see
+ * whether that prepared update is resolved or not. If not resolved,
+ * continue returning prepare conflict. If resolved, return the value
+ * based on the visibility rules.
*/
- F_CLR(cbt, WT_CBT_RETRY_NEXT);
- if (F_ISSET(cbt, WT_CBT_RETRY_PREV)) {
- WT_ERR(__wt_cursor_valid(cbt, &upd, &valid));
- if (!valid)
- WT_ERR(WT_PREPARE_CONFLICT);
-
- /* The update that returned prepared conflict is now visible. */
- F_CLR(cbt, WT_CBT_RETRY_PREV);
-
- /*
- * The update that returned prepared conflict is now visible.
- *
- * The underlying key-return function uses a comparison value
- * of 0 to indicate the search function has pre-built the key
- * we want to return. That's not the case, don't take that path.
- */
- cbt->compare = 1;
- WT_ERR(__cursor_kv_return(session, cbt, upd));
+ if (F_ISSET(cbt, WT_CBT_ITERATE_RETRY_PREV)) {
+ WT_ERR(__cursor_check_prepared_update(cbt, &visible));
+ if (visible) {
#ifdef HAVE_DIAGNOSTIC
- WT_ERR(__wt_cursor_key_order_check(session, cbt, false));
+ WT_ERR(
+ __wt_cursor_key_order_check(session, cbt, false));
#endif
- return (0);
+ return (0);
+ }
}
WT_ERR(__cursor_func_init(cbt, false));
@@ -619,7 +604,7 @@ __wt_btcur_prev(WT_CURSOR_BTREE *cbt, bool truncating)
break;
WT_ILLEGAL_VALUE_ERR(session, page->type);
}
- if (ret == 0)
+ if (ret == 0 || ret == WT_PREPARE_CONFLICT)
break;
F_CLR(cbt, WT_CBT_ITERATE_APPEND);
if (ret != WT_NOTFOUND)
@@ -667,7 +652,21 @@ err: switch (ret) {
case 0:
F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT);
#ifdef HAVE_DIAGNOSTIC
- ret = __wt_cursor_key_order_check(session, cbt, false);
+ /*
+ * Skip key order check, if next is called after a prev returned
+ * a prepare conflict error, i.e cursor has changed direction
+ * at a prepared update, hence current key returned could be
+ * same as earlier returned key.
+ *
+ * eg: Initial data set : {2,3,...10)
+ * insert key 1 in a prepare transaction.
+ * loop on prev will return 10,...3,2 and subsequent call to
+ * prev will return a prepare conflict. Now if we call next
+ * key 2 will be returned which will be same as earlier
+ * returned key.
+ */
+ if (!F_ISSET(cbt, WT_CBT_ITERATE_RETRY_NEXT))
+ ret = __wt_cursor_key_order_check(session, cbt, false);
#endif
break;
case WT_PREPARE_CONFLICT:
@@ -676,10 +675,11 @@ err: switch (ret) {
* as current cursor position will be reused in case of a
* retry from user.
*/
- F_SET(cbt, WT_CBT_RETRY_PREV);
+ F_SET(cbt, WT_CBT_ITERATE_RETRY_PREV);
break;
default:
WT_TRET(__cursor_reset(cbt));
}
+ F_CLR(cbt, WT_CBT_ITERATE_RETRY_NEXT);
return (ret);
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_debug.c b/src/third_party/wiredtiger/src/btree/bt_debug.c
index 3ffc63d94ba..bedcf37d9f8 100644
--- a/src/third_party/wiredtiger/src/btree/bt_debug.c
+++ b/src/third_party/wiredtiger/src/btree/bt_debug.c
@@ -1173,6 +1173,8 @@ __debug_modify(WT_DBG *ds, WT_UPDATE *upd)
static int
__debug_update(WT_DBG *ds, WT_UPDATE *upd, bool hexbyte)
{
+ char hex_timestamp[WT_TS_HEX_SIZE];
+
for (; upd != NULL; upd = upd->next) {
switch (upd->type) {
case WT_UPDATE_INVALID:
@@ -1207,15 +1209,11 @@ __debug_update(WT_DBG *ds, WT_UPDATE *upd, bool hexbyte)
else
WT_RET(ds->f(ds, "\t" "txn id %" PRIu64, upd->txnid));
-#ifdef HAVE_TIMESTAMPS
- if (!__wt_timestamp_iszero(
- WT_TIMESTAMP_NULL(&upd->timestamp))) {
- char hex_timestamp[2 * WT_TIMESTAMP_SIZE + 1];
- WT_RET(__wt_timestamp_to_hex_string(
- ds->session, hex_timestamp, &upd->timestamp));
+ if (upd->timestamp != 0) {
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, upd->timestamp);
WT_RET(ds->f(ds, ", stamp %s", hex_timestamp));
}
-#endif
WT_RET(ds->f(ds, "\n"));
}
return (0);
diff --git a/src/third_party/wiredtiger/src/btree/bt_delete.c b/src/third_party/wiredtiger/src/btree/bt_delete.c
index 496d59c947c..67367e3d752 100644
--- a/src/third_party/wiredtiger/src/btree/bt_delete.c
+++ b/src/third_party/wiredtiger/src/btree/bt_delete.c
@@ -295,7 +295,7 @@ __wt_delete_page_skip(WT_SESSION_IMPL *session, WT_REF *ref, bool visible_all)
*/
if (skip && ref->page_del != NULL && (visible_all ||
__wt_txn_visible_all(session, ref->page_del->txnid,
- WT_TIMESTAMP_NULL(&ref->page_del->timestamp)))) {
+ ref->page_del->timestamp))) {
__wt_free(session, ref->page_del->update_list);
__wt_free(session, ref->page_del);
}
@@ -323,7 +323,7 @@ __tombstone_update_alloc(WT_SESSION_IMPL *session,
*/
if (page_del != NULL) {
upd->txnid = page_del->txnid;
- __wt_timestamp_set(&upd->timestamp, &page_del->timestamp);
+ upd->timestamp = page_del->timestamp;
upd->prepare_state = page_del->prepare_state;
}
*updp = upd;
diff --git a/src/third_party/wiredtiger/src/btree/bt_read.c b/src/third_party/wiredtiger/src/btree/bt_read.c
index 85597710bc5..f6f7212eb85 100644
--- a/src/third_party/wiredtiger/src/btree/bt_read.c
+++ b/src/third_party/wiredtiger/src/btree/bt_read.c
@@ -120,9 +120,10 @@ __las_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref)
WT_CURSOR_BTREE cbt;
WT_DECL_ITEM(current_key);
WT_DECL_RET;
- WT_ITEM las_key, las_timestamp, las_value;
+ WT_ITEM las_key, las_value;
WT_PAGE *page;
WT_UPDATE *first_upd, *last_upd, *upd;
+ wt_timestamp_t las_timestamp;
size_t incr, total_incr;
uint64_t current_recno, las_counter, las_pageid, las_txnid, recno;
uint32_t las_id, session_flags;
@@ -187,11 +188,8 @@ __las_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref)
session, &las_value, &upd, &incr, upd_type));
total_incr += incr;
upd->txnid = las_txnid;
+ upd->timestamp = las_timestamp;
upd->prepare_state = prepare_state;
-#ifdef HAVE_TIMESTAMPS
- WT_ASSERT(session, las_timestamp.size == WT_TIMESTAMP_SIZE);
- memcpy(&upd->timestamp, las_timestamp.data, las_timestamp.size);
-#endif
switch (page->type) {
case WT_PAGE_COL_FIX:
@@ -284,10 +282,10 @@ __las_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref)
!ref->page_las->has_prepares &&
!S2C(session)->txn_global.has_stable_timestamp &&
__wt_txn_visible_all(session, ref->page_las->unstable_txn,
- WT_TIMESTAMP_NULL(&ref->page_las->unstable_timestamp))) {
+ ref->page_las->unstable_timestamp)) {
page->modify->rec_max_txn = ref->page_las->max_txn;
- __wt_timestamp_set(&page->modify->rec_max_timestamp,
- &ref->page_las->max_timestamp);
+ page->modify->rec_max_timestamp =
+ ref->page_las->max_timestamp;
__wt_page_modify_clear(session, page);
}
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c
index 2f2023917eb..b2e0883010d 100644
--- a/src/third_party/wiredtiger/src/btree/bt_split.c
+++ b/src/third_party/wiredtiger/src/btree/bt_split.c
@@ -1531,15 +1531,12 @@ __split_multi_inmem(
*/
mod->last_evict_pass_gen = orig->modify->last_evict_pass_gen;
mod->last_eviction_id = orig->modify->last_eviction_id;
- __wt_timestamp_set(&mod->last_eviction_timestamp,
- &orig->modify->last_eviction_timestamp);
+ mod->last_eviction_timestamp = orig->modify->last_eviction_timestamp;
/* Add the update/restore flag to any previous state. */
- __wt_timestamp_set(&mod->last_stable_timestamp,
- &orig->modify->last_stable_timestamp);
+ mod->last_stable_timestamp = orig->modify->last_stable_timestamp;
mod->rec_max_txn = orig->modify->rec_max_txn;
- __wt_timestamp_set(&mod->rec_max_timestamp,
- &orig->modify->rec_max_timestamp);
+ mod->rec_max_timestamp = orig->modify->rec_max_timestamp;
mod->restore_state = orig->modify->restore_state;
FLD_SET(mod->restore_state, WT_PAGE_RS_RESTORED);
diff --git a/src/third_party/wiredtiger/src/btree/bt_stat.c b/src/third_party/wiredtiger/src/btree/bt_stat.c
index 2fd23596cd7..88efe4e2e24 100644
--- a/src/third_party/wiredtiger/src/btree/bt_stat.c
+++ b/src/third_party/wiredtiger/src/btree/bt_stat.c
@@ -44,6 +44,9 @@ __wt_btree_stat_init(WT_SESSION_IMPL *session, WT_CURSOR_STAT *cst)
WT_STAT_SET(session, stats, cache_bytes_dirty,
__wt_btree_dirty_inuse(session));
+ WT_STAT_SET(session, stats, cache_bytes_dirty_total,
+ __wt_cache_bytes_plus_overhead(
+ S2C(session)->cache, btree->bytes_dirty_total));
WT_STAT_SET(session, stats, cache_bytes_inuse,
__wt_btree_bytes_inuse(session));
diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c
index c5c08faa701..c6d1d2d18ea 100644
--- a/src/third_party/wiredtiger/src/btree/bt_sync.c
+++ b/src/third_party/wiredtiger/src/btree/bt_sync.c
@@ -269,14 +269,11 @@ __sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
if (((mod = walk->page->modify) != NULL) &&
mod->rec_max_txn > btree->rec_max_txn)
btree->rec_max_txn = mod->rec_max_txn;
-#ifdef HAVE_TIMESTAMPS
- if (mod != NULL && __wt_timestamp_cmp(
- &btree->rec_max_timestamp,
- &mod->rec_max_timestamp) < 0)
- __wt_timestamp_set(
- &btree->rec_max_timestamp,
- &mod->rec_max_timestamp);
-#endif
+ if (mod != NULL &&
+ btree->rec_max_timestamp <
+ mod->rec_max_timestamp)
+ btree->rec_max_timestamp =
+ mod->rec_max_timestamp;
continue;
}
diff --git a/src/third_party/wiredtiger/src/btree/row_modify.c b/src/third_party/wiredtiger/src/btree/row_modify.c
index b7f889c6356..c2da7318fd3 100644
--- a/src/third_party/wiredtiger/src/btree/row_modify.c
+++ b/src/third_party/wiredtiger/src/btree/row_modify.c
@@ -356,13 +356,9 @@ __wt_update_obsolete_check(
*/
if (count > 20 && page->modify != NULL) {
page->modify->obsolete_check_txn = txn_global->last_running;
-#ifdef HAVE_TIMESTAMPS
if (txn_global->has_pinned_timestamp)
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(
- &page->modify->obsolete_check_timestamp,
- &txn_global->pinned_timestamp));
-#endif
+ page->modify->obsolete_check_timestamp =
+ txn_global->pinned_timestamp;
}
return (NULL);
diff --git a/src/third_party/wiredtiger/src/cache/cache_las.c b/src/third_party/wiredtiger/src/cache/cache_las.c
index 94986a184e7..411132b6e13 100644
--- a/src/third_party/wiredtiger/src/cache/cache_las.c
+++ b/src/third_party/wiredtiger/src/cache/cache_las.c
@@ -421,14 +421,12 @@ __wt_las_page_skip_locked(WT_SESSION_IMPL *session, WT_REF *ref)
if (!F_ISSET(txn, WT_TXN_HAS_TS_READ))
return (ref->page_las->skew_newest);
-#ifdef HAVE_TIMESTAMPS
/*
* Skip lookaside pages if reading as of a timestamp, we evicted new
* versions of data and all the updates are in the past.
*/
if (ref->page_las->skew_newest &&
- __wt_timestamp_cmp(
- &txn->read_timestamp, &ref->page_las->unstable_timestamp) > 0)
+ txn->read_timestamp > ref->page_las->unstable_timestamp)
return (true);
/*
@@ -436,10 +434,8 @@ __wt_las_page_skip_locked(WT_SESSION_IMPL *session, WT_REF *ref)
* versions of data and all the unstable updates are in the future.
*/
if (!ref->page_las->skew_newest &&
- __wt_timestamp_cmp(
- &txn->read_timestamp, &ref->page_las->unstable_timestamp) < 0)
+ txn->read_timestamp < ref->page_las->unstable_timestamp)
return (true);
-#endif
return (false);
}
@@ -540,7 +536,7 @@ err: if (local_txn) {
* Display a verbose message once per checkpoint with details about the
* cache state when performing a lookaside table write.
*/
-static int
+static void
__las_insert_block_verbose(
WT_SESSION_IMPL *session, WT_BTREE *btree, WT_MULTI *multi)
{
@@ -549,16 +545,14 @@ __las_insert_block_verbose(
double pct_dirty, pct_full;
uint64_t ckpt_gen_current, ckpt_gen_last;
uint32_t btree_id;
-#ifdef HAVE_TIMESTAMPS
- char hex_timestamp[2 * WT_TIMESTAMP_SIZE + 1];
-#endif
+ char hex_timestamp[WT_TS_HEX_SIZE];
const char *ts;
btree_id = btree->id;
if (!WT_VERBOSE_ISSET(session,
WT_VERB_LOOKASIDE | WT_VERB_LOOKASIDE_ACTIVITY))
- return (0);
+ return;
conn = S2C(session);
cache = conn->cache;
@@ -577,13 +571,9 @@ __las_insert_block_verbose(
(void)__wt_eviction_clean_needed(session, &pct_full);
(void)__wt_eviction_dirty_needed(session, &pct_dirty);
-#ifdef HAVE_TIMESTAMPS
- WT_RET(__wt_timestamp_to_hex_string(session, hex_timestamp,
- &multi->page_las.unstable_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, multi->page_las.unstable_timestamp);
ts = hex_timestamp;
-#else
- ts = "disabled";
-#endif
__wt_verbose(session,
WT_VERB_LOOKASIDE | WT_VERB_LOOKASIDE_ACTIVITY,
"Page reconciliation triggered lookaside write "
@@ -603,7 +593,6 @@ __las_insert_block_verbose(
/* Never skip updating the tracked generation */
if (WT_VERBOSE_ISSET(session, WT_VERB_LOOKASIDE))
cache->las_verb_gen_write = ckpt_gen_current;
- return (0);
}
/*
@@ -616,28 +605,23 @@ __wt_las_insert_block(WT_CURSOR *cursor,
{
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
- WT_DECL_TIMESTAMP(prev_timestamp)
- WT_ITEM las_timestamp, las_value;
+ WT_ITEM las_value;
WT_SAVE_UPD *list;
WT_SESSION_IMPL *session;
WT_TXN_ISOLATION saved_isolation;
WT_UPDATE *upd;
- uint64_t insert_cnt, prepared_insert_cnt;
- uint64_t las_counter, las_pageid;
+ uint64_t insert_cnt, las_counter, las_pageid, prepared_insert_cnt;
uint32_t btree_id, i, slot;
uint8_t *p;
bool local_txn;
session = (WT_SESSION_IMPL *)cursor->session;
conn = S2C(session);
- WT_CLEAR(las_timestamp);
WT_CLEAR(las_value);
insert_cnt = prepared_insert_cnt = 0;
btree_id = btree->id;
local_txn = false;
- __wt_timestamp_set_zero(&prev_timestamp);
-
las_pageid = __wt_atomic_add64(&conn->cache->las_pageid, 1);
if (!btree->lookaside_entries)
@@ -732,10 +716,6 @@ __wt_las_insert_block(WT_CURSOR *cursor,
cursor->set_key(cursor,
las_pageid, btree_id, ++las_counter, key);
-#ifdef HAVE_TIMESTAMPS
- las_timestamp.data = &upd->timestamp;
- las_timestamp.size = WT_TIMESTAMP_SIZE;
-#endif
/*
* If saving a non-zero length value on the page, save a
* birthmark instead of duplicating it in the lookaside
@@ -748,11 +728,11 @@ __wt_las_insert_block(WT_CURSOR *cursor,
upd->type == WT_UPDATE_MODIFY)) {
las_value.size = 0;
cursor->set_value(cursor, upd->txnid,
- &las_timestamp, upd->prepare_state,
+ upd->timestamp, upd->prepare_state,
WT_UPDATE_BIRTHMARK, &las_value);
} else
cursor->set_value(cursor, upd->txnid,
- &las_timestamp, upd->prepare_state,
+ upd->timestamp, upd->prepare_state,
upd->type, &las_value);
/*
@@ -790,7 +770,7 @@ err: /* Resolve the transaction. */
if (ret == 0 && insert_cnt > 0) {
multi->page_las.las_pageid = las_pageid;
multi->page_las.has_prepares = prepared_insert_cnt > 0;
- ret = __las_insert_block_verbose(session, btree, multi);
+ __las_insert_block_verbose(session, btree, multi);
}
return (ret);
@@ -996,14 +976,10 @@ __wt_las_sweep(WT_SESSION_IMPL *session)
WT_CURSOR *cursor;
WT_DECL_ITEM(saved_key);
WT_DECL_RET;
- WT_ITEM las_key, las_timestamp, las_value;
+ WT_ITEM las_key, las_value;
WT_ITEM *sweep_key;
WT_TXN_ISOLATION saved_isolation;
-#ifdef HAVE_TIMESTAMPS
- wt_timestamp_t timestamp, *val_ts;
-#else
- wt_timestamp_t *val_ts;
-#endif
+ wt_timestamp_t las_timestamp;
uint64_t cnt, remove_cnt, las_pageid, saved_pageid, visit_cnt;
uint64_t las_counter, las_txnid;
uint32_t las_id, session_flags;
@@ -1129,13 +1105,6 @@ __wt_las_sweep(WT_SESSION_IMPL *session)
*/
WT_ERR(cursor->get_value(cursor, &las_txnid,
&las_timestamp, &prepare_state, &upd_type, &las_value));
-#ifdef HAVE_TIMESTAMPS
- WT_ASSERT(session, las_timestamp.size == WT_TIMESTAMP_SIZE);
- memcpy(&timestamp, las_timestamp.data, las_timestamp.size);
- val_ts = &timestamp;
-#else
- val_ts = NULL;
-#endif
/*
* Check to see if the page or key has changed this iteration,
@@ -1166,7 +1135,8 @@ __wt_las_sweep(WT_SESSION_IMPL *session)
* * The entry wasn't from a prepared transaction.
*/
if (upd_type == WT_UPDATE_BIRTHMARK &&
- __wt_txn_visible_all(session, las_txnid, val_ts) &&
+ __wt_txn_visible_all(
+ session, las_txnid, las_timestamp) &&
prepare_state != WT_PREPARE_INPROGRESS)
removing_key_block = true;
else
diff --git a/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c b/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c
index 240c2a421bf..6d9d0919ec6 100644
--- a/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c
+++ b/src/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.c
@@ -26,15 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <wiredtiger_config.h>
#include <inttypes.h>
#include <stddef.h>
-/*
- * The checksum code doesn't include WiredTiger configuration or include files.
- * This means the HAVE_NO_CRC32_HARDWARE #define isn't configurable as part of
- * standalone WiredTiger configuration, there's no way to turn off the checksum
- * hardware.
- */
#if defined(__linux__) && !defined(HAVE_NO_CRC32_HARDWARE)
#include <asm/hwcap.h>
#include <sys/auxv.h>
diff --git a/src/third_party/wiredtiger/src/checksum/power8/crc32.sx b/src/third_party/wiredtiger/src/checksum/power8/crc32.sx
index f8a89cd7c06..3eca99bdc53 100644
--- a/src/third_party/wiredtiger/src/checksum/power8/crc32.sx
+++ b/src/third_party/wiredtiger/src/checksum/power8/crc32.sx
@@ -1,9 +1,4 @@
-/*
- * The checksum code doesn't include WiredTiger configuration or include files.
- * This means the HAVE_NO_CRC32_HARDWARE #define isn't configurable as part of
- * standalone WiredTiger configuration, there's no way to turn off the checksum
- * hardware.
- */
+#include <wiredtiger_config.h>
#if defined(__powerpc64__) && !defined(HAVE_NO_CRC32_HARDWARE)
/*
diff --git a/src/third_party/wiredtiger/src/checksum/power8/crc32_wrapper.c b/src/third_party/wiredtiger/src/checksum/power8/crc32_wrapper.c
index 074891eb0e7..343df75339e 100644
--- a/src/third_party/wiredtiger/src/checksum/power8/crc32_wrapper.c
+++ b/src/third_party/wiredtiger/src/checksum/power8/crc32_wrapper.c
@@ -1,12 +1,7 @@
+#include <wiredtiger_config.h>
#include <inttypes.h>
#include <stddef.h>
-/*
- * The checksum code doesn't include WiredTiger configuration or include files.
- * This means the HAVE_NO_CRC32_HARDWARE #define isn't configurable as part of
- * standalone WiredTiger configuration, there's no way to turn off the checksum
- * hardware.
- */
#if defined(__powerpc64__) && !defined(HAVE_NO_CRC32_HARDWARE)
#define CRC_TABLE
#include "crc32_constants.h"
diff --git a/src/third_party/wiredtiger/src/checksum/software/checksum.c b/src/third_party/wiredtiger/src/checksum/software/checksum.c
index 4d93f8bf1ea..d024d2693f4 100644
--- a/src/third_party/wiredtiger/src/checksum/software/checksum.c
+++ b/src/third_party/wiredtiger/src/checksum/software/checksum.c
@@ -38,6 +38,7 @@
* little endian.
*/
+#include <wiredtiger_config.h>
#include <inttypes.h>
#include <stddef.h>
diff --git a/src/third_party/wiredtiger/src/checksum/x86/crc32-x86.c b/src/third_party/wiredtiger/src/checksum/x86/crc32-x86.c
index 70860019e02..40dab199ff3 100644
--- a/src/third_party/wiredtiger/src/checksum/x86/crc32-x86.c
+++ b/src/third_party/wiredtiger/src/checksum/x86/crc32-x86.c
@@ -26,15 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <wiredtiger_config.h>
#include <inttypes.h>
#include <stddef.h>
-/*
- * The checksum code doesn't include WiredTiger configuration or include files.
- * This means the HAVE_NO_CRC32_HARDWARE #define isn't configurable as part of
- * standalone WiredTiger configuration, there's no way to turn off the checksum
- * hardware.
- */
#if !defined(HAVE_NO_CRC32_HARDWARE)
#if (defined(__amd64) || defined(__x86_64))
/*
diff --git a/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c b/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
index 9c7ae30bf71..5edd5775478 100644
--- a/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
+++ b/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
@@ -7,17 +7,12 @@
*
*/
+#include <wiredtiger_config.h>
#include <sys/types.h>
#include <endian.h>
#include <inttypes.h>
#include <stddef.h>
-/*
- * The checksum code doesn't include WiredTiger configuration or include files.
- * This means the HAVE_NO_CRC32_HARDWARE #define isn't configurable as part of
- * standalone WiredTiger configuration, there's no way to turn off the checksum
- * hardware.
- */
#if defined(__linux__) && !defined(HAVE_NO_CRC32_HARDWARE)
#include <sys/auxv.h>
diff --git a/src/third_party/wiredtiger/src/checksum/zseries/crc32le-vx.sx b/src/third_party/wiredtiger/src/checksum/zseries/crc32le-vx.sx
index 41ee20d3e94..1bfdddc3181 100644
--- a/src/third_party/wiredtiger/src/checksum/zseries/crc32le-vx.sx
+++ b/src/third_party/wiredtiger/src/checksum/zseries/crc32le-vx.sx
@@ -1,9 +1,4 @@
-/*
- * The checksum code doesn't include WiredTiger configuration or include files.
- * This means the HAVE_NO_CRC32_HARDWARE #define isn't configurable as part of
- * standalone WiredTiger configuration, there's no way to turn off the checksum
- * hardware.
- */
+#include <wiredtiger_config.h>
#if !defined(HAVE_NO_CRC32_HARDWARE)
/*
diff --git a/src/third_party/wiredtiger/src/conn/conn_cache.c b/src/third_party/wiredtiger/src/conn/conn_cache.c
index dbb602921a8..6e0a24c97b7 100644
--- a/src/third_party/wiredtiger/src/conn/conn_cache.c
+++ b/src/third_party/wiredtiger/src/conn/conn_cache.c
@@ -314,6 +314,8 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session)
WT_STAT_SET(session, stats,
cache_bytes_dirty, __wt_cache_dirty_inuse(cache));
+ WT_STAT_SET(session, stats, cache_bytes_dirty_total,
+ __wt_cache_bytes_plus_overhead(cache, cache->bytes_dirty_total));
WT_STAT_SET(session, stats,
cache_bytes_image, __wt_cache_bytes_image(cache));
WT_STAT_SET(session, stats,
diff --git a/src/third_party/wiredtiger/src/conn/conn_log.c b/src/third_party/wiredtiger/src/conn/conn_log.c
index 2f3d8d64dad..dc6e4a82509 100644
--- a/src/third_party/wiredtiger/src/conn/conn_log.c
+++ b/src/third_party/wiredtiger/src/conn/conn_log.c
@@ -447,7 +447,18 @@ __log_prealloc_once(WT_SESSION_IMPL *session)
__wt_verbose(session, WT_VERB_LOG,
"Missed %" PRIu32 ". Now pre-allocating up to %" PRIu32,
log->prep_missed, conn->log_prealloc);
+ } else if (reccount > conn->log_prealloc / 2 &&
+ conn->log_prealloc > 2) {
+ /*
+ * If we used less than half, then start adjusting down.
+ */
+ --conn->log_prealloc;
+ __wt_verbose(session, WT_VERB_LOG,
+ "Adjust down. Did not use %" PRIu32
+ ". Now pre-allocating %" PRIu32,
+ reccount, conn->log_prealloc);
}
+
WT_STAT_CONN_SET(session, log_prealloc_max, conn->log_prealloc);
/*
* Allocate up to the maximum number that we just computed and detected.
@@ -920,6 +931,7 @@ __log_server(void *arg)
* pre-allocation. Start it so that we run on the first time through.
*/
timediff = WT_THOUSAND;
+ time_start = __wt_clock(session);
/*
* The log server thread does a variety of work. It forces out any
@@ -1001,10 +1013,10 @@ __log_server(void *arg)
"log_archive: Blocked due to open "
"log cursor holding archive lock");
}
+ time_start = __wt_clock(session);
}
/* Wait until the next event. */
- time_start = __wt_clock(session);
__wt_cond_auto_wait_signal(
session, conn->log_cond, did_work, NULL, &signalled);
time_stop = __wt_clock(session);
diff --git a/src/third_party/wiredtiger/src/conn/conn_sweep.c b/src/third_party/wiredtiger/src/conn/conn_sweep.c
index 734c455d854..78e0c8f9fc2 100644
--- a/src/third_party/wiredtiger/src/conn/conn_sweep.c
+++ b/src/third_party/wiredtiger/src/conn/conn_sweep.c
@@ -85,7 +85,7 @@ __sweep_expire_one(WT_SESSION_IMPL *session)
/* Only sweep clean trees where all updates are visible. */
if (btree != NULL && (btree->modified || !__wt_txn_visible_all(session,
- btree->rec_max_txn, WT_TIMESTAMP_NULL(&btree->rec_max_timestamp))))
+ btree->rec_max_txn, btree->rec_max_timestamp)))
goto err;
/*
diff --git a/src/third_party/wiredtiger/src/cursor/cur_stat.c b/src/third_party/wiredtiger/src/cursor/cur_stat.c
index 25d4b588d3b..a65043b138a 100644
--- a/src/third_party/wiredtiger/src/cursor/cur_stat.c
+++ b/src/third_party/wiredtiger/src/cursor/cur_stat.c
@@ -514,6 +514,37 @@ __curstat_join_init(WT_SESSION_IMPL *session,
}
/*
+ * __curstat_session_init --
+ * Initialize the statistics for a session.
+ */
+static void
+__curstat_session_init(WT_SESSION_IMPL *session, WT_CURSOR_STAT *cst)
+{
+ /* This is a stub at the moment, initialize the session stats to 0. */
+ session->stats.bytes_read = 0;
+ session->stats.bytes_write = 0;
+ session->stats.cache_time = 0;
+ session->stats.lock_dhandle_wait = 0;
+ session->stats.lock_schema_wait = 0;
+ session->stats.read_time = 0;
+ session->stats.write_time = 0;
+
+ /*
+ * Copy stats from the session to the cursor. Optionally clear the
+ * session's statistics.
+ */
+ memcpy(&cst->u.session_stats,
+ &session->stats, sizeof(WT_SESSION_STATS));
+ if (F_ISSET(cst, WT_STAT_CLEAR))
+ __wt_stat_session_clear_single(&session->stats);
+
+ cst->stats = (int64_t *)&cst->u.session_stats;
+ cst->stats_base = WT_SESSION_STATS_BASE;
+ cst->stats_count = sizeof(WT_SESSION_STATS) / sizeof(int64_t);
+ cst->stats_desc = __wt_stat_session_desc;
+}
+
+/*
* __wt_curstat_init --
* Initialize a statistics cursor.
*/
@@ -532,23 +563,21 @@ __wt_curstat_init(WT_SESSION_IMPL *session,
if (strcmp(dsrc_uri, "join") == 0)
WT_RET(__curstat_join_init(session, curjoin, cfg, cst));
-
+ else if (strcmp(dsrc_uri, "session") == 0) {
+ __curstat_session_init(session, cst);
+ return (0);
+ }
else if (WT_PREFIX_MATCH(dsrc_uri, "colgroup:"))
WT_RET(
__wt_curstat_colgroup_init(session, dsrc_uri, cfg, cst));
-
else if (WT_PREFIX_MATCH(dsrc_uri, "file:"))
WT_RET(__curstat_file_init(session, dsrc_uri, cfg, cst));
-
else if (WT_PREFIX_MATCH(dsrc_uri, "index:"))
WT_RET(__wt_curstat_index_init(session, dsrc_uri, cfg, cst));
-
else if (WT_PREFIX_MATCH(dsrc_uri, "lsm:"))
WT_RET(__wt_curstat_lsm_init(session, dsrc_uri, cst));
-
else if (WT_PREFIX_MATCH(dsrc_uri, "table:"))
WT_RET(__wt_curstat_table_init(session, dsrc_uri, cfg, cst));
-
else
return (__wt_bad_object_type(session, uri));
diff --git a/src/third_party/wiredtiger/src/docs/transactions.dox b/src/third_party/wiredtiger/src/docs/transactions.dox
index 917986f7df3..255cba4cb52 100644
--- a/src/third_party/wiredtiger/src/docs/transactions.dox
+++ b/src/third_party/wiredtiger/src/docs/transactions.dox
@@ -157,19 +157,12 @@ Named snapshots are not durable: they do not survive WT_CONNECTION::close.
Some applications have their own notion of time, including an expected commit
order for transactions that may be inconsistent with the order assigned by
-WiredTiger. We assume that applications can represent their notion of a
-timestamp as an unsigned integral value of some size that generally increases
-over time. For example, a simple 64-bit integer could be incremented to
-generate transaction timestamps, if that is sufficient for the application.
-
-The application's timestamp size is specified as a number of bytes at build
-time, with <code>configure --with-timestamp-size=X</code>. The default
-timestamp size is 8 bytes (i.e., 64 bits). Setting a size of zero disables
-transaction timestamp functionality. Timestamps are communicated to WiredTiger
-using a hexadecimal encoding, so the encoded value can be twice as long as the
-raw timestamp value.
-
-Applications assign explicit commit timestamps to transactions, then read
+WiredTiger. We assume applications can represent their notion of a timestamp
+as an unsigned 64-bit integral value that generally increases over time. For
+example, a counter could be incremented to generate transaction timestamps,
+if that is sufficient for the application.
+
+Applications can assign explicit commit timestamps to transactions, then read
"as of" a timestamp. The timestamp mechanism operates in parallel with
WiredTiger's internal transaction ID management. It is recommended that once
timestamps are in use for a particular table, all subsequent updates also use
@@ -180,7 +173,7 @@ timestamps.
Applications that use timestamps will generally provide a timestamp at
WT_SESSION::transaction_commit that will be assigned to all updates that are
part of the transaction. WiredTiger also provides the ability to set a different
-commit timestamp for different sets of updates in a single transaction. This can
+commit timestamp for different updates in a single transaction. This can
be done by calling WT_SESSION::timestamp_transaction repeatedly to set a new
commit timestamp between a set of updates for the current transaction. This
gives the ability to commit updates with different read "as of" timestamps in a
diff --git a/src/third_party/wiredtiger/src/docs/upgrading.dox b/src/third_party/wiredtiger/src/docs/upgrading.dox
index 0d8e5e1b428..3428e2781d9 100644
--- a/src/third_party/wiredtiger/src/docs/upgrading.dox
+++ b/src/third_party/wiredtiger/src/docs/upgrading.dox
@@ -4,6 +4,14 @@
@section version_311 Upgrading to Version 3.1.1
<dl>
+<dt>WiredTiger timestamps</dt>
+<dd>
+In previous releases of WiredTiger, it was possible to disable timestamp
+support as well as to configure a timestamp size different from the 64-bit
+default, using the <code>--with-timestamp-size=X</code> configuration option.
+That is no longer the case, in the 3.1.1 release, timestamps are always
+configured, and are always 64-bit unsigned integers.
+
<dt>WT_CURSOR::modify transaction requirements</dt>
<dd>
In previous releases of WiredTiger, it was possible to use implicit
diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c
index 59b568aab5c..776c10d03e9 100644
--- a/src/third_party/wiredtiger/src/evict/evict_lru.c
+++ b/src/third_party/wiredtiger/src/evict/evict_lru.c
@@ -1957,7 +1957,7 @@ __evict_walk_tree(WT_SESSION_IMPL *session,
!WT_PAGE_IS_INTERNAL(page) &&
!modified && page->modify != NULL &&
!__wt_txn_visible_all(session, page->modify->rec_max_txn,
- WT_TIMESTAMP_NULL(&page->modify->rec_max_timestamp))) {
+ page->modify->rec_max_timestamp)) {
__wt_page_modify_set(session, page);
goto fast;
}
diff --git a/src/third_party/wiredtiger/src/evict/evict_page.c b/src/third_party/wiredtiger/src/evict/evict_page.c
index 05bda7b3b14..f5765cc4313 100644
--- a/src/third_party/wiredtiger/src/evict/evict_page.c
+++ b/src/third_party/wiredtiger/src/evict/evict_page.c
@@ -316,7 +316,7 @@ __evict_page_clean_update(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
F_ISSET(session->dhandle, WT_DHANDLE_DEAD) ||
(ref->page_las != NULL && ref->page_las->eviction_to_lookaside) ||
__wt_txn_visible_all(session, ref->page->modify->rec_max_txn,
- WT_TIMESTAMP_NULL(&ref->page->modify->rec_max_timestamp)));
+ ref->page->modify->rec_max_timestamp));
/*
* Discard the page and update the reference structure. If evicting a
@@ -669,7 +669,7 @@ __evict_review(
*/
if (WT_SESSION_BTREE_SYNC(session) && !__wt_page_is_modified(page) &&
!__wt_txn_visible_all(session, page->modify->rec_max_txn,
- WT_TIMESTAMP_NULL(&page->modify->rec_max_timestamp)))
+ page->modify->rec_max_timestamp))
return (__wt_set_return(session, EBUSY));
/*
diff --git a/src/third_party/wiredtiger/src/include/btmem.h b/src/third_party/wiredtiger/src/include/btmem.h
index 65ec0b3b816..b9b66bf0c7b 100644
--- a/src/third_party/wiredtiger/src/include/btmem.h
+++ b/src/third_party/wiredtiger/src/include/btmem.h
@@ -223,7 +223,7 @@ struct __wt_ovfl_reuse {
#endif
#define WT_LAS_CONFIG \
"key_format=" WT_UNCHECKED_STRING(QIQu) \
- ",value_format=" WT_UNCHECKED_STRING(QuBBu) \
+ ",value_format=" WT_UNCHECKED_STRING(QQBBu) \
",block_compressor=" WT_LOOKASIDE_COMPRESSOR \
",leaf_value_max=64MB" \
",prefix_compression=true"
@@ -236,8 +236,8 @@ struct __wt_page_lookaside {
uint64_t las_pageid; /* Page ID in lookaside */
uint64_t max_txn; /* Maximum transaction ID */
uint64_t unstable_txn; /* First transaction ID not on page */
- WT_DECL_TIMESTAMP(max_timestamp)/* Maximum timestamp */
- WT_DECL_TIMESTAMP(unstable_timestamp)/* First timestamp not on page */
+ wt_timestamp_t max_timestamp; /* Maximum timestamp */
+ wt_timestamp_t unstable_timestamp;/* First timestamp not on page */
bool eviction_to_lookaside; /* Revert to lookaside on eviction */
bool has_prepares; /* One or more updates are prepared */
bool skew_newest; /* Page image has newest versions */
@@ -254,7 +254,7 @@ struct __wt_page_modify {
/* The transaction state last time eviction was attempted. */
uint64_t last_evict_pass_gen;
uint64_t last_eviction_id;
- WT_DECL_TIMESTAMP(last_eviction_timestamp)
+ wt_timestamp_t last_eviction_timestamp;
#ifdef HAVE_DIAGNOSTIC
/* Check that transaction time moves forward. */
@@ -263,14 +263,14 @@ struct __wt_page_modify {
/* Avoid checking for obsolete updates during checkpoints. */
uint64_t obsolete_check_txn;
- WT_DECL_TIMESTAMP(obsolete_check_timestamp)
+ wt_timestamp_t obsolete_check_timestamp;
/* The largest transaction seen on the page by reconciliation. */
uint64_t rec_max_txn;
- WT_DECL_TIMESTAMP(rec_max_timestamp)
+ wt_timestamp_t rec_max_timestamp;
/* Stable timestamp at last reconciliation. */
- WT_DECL_TIMESTAMP(last_stable_timestamp)
+ wt_timestamp_t last_stable_timestamp;
/* The largest update transaction ID (approximate). */
uint64_t update_txn;
@@ -818,7 +818,7 @@ struct __wt_page {
*/
struct __wt_page_deleted {
volatile uint64_t txnid; /* Transaction ID */
- WT_DECL_TIMESTAMP(timestamp)
+ wt_timestamp_t timestamp;
/*
* The state is used for transaction prepare to manage visibility
@@ -1048,9 +1048,7 @@ struct __wt_ikey {
*/
struct __wt_update {
volatile uint64_t txnid; /* transaction ID */
-#if WT_TIMESTAMP_SIZE == 8
- WT_DECL_TIMESTAMP(timestamp) /* aligned uint64_t timestamp */
-#endif
+ wt_timestamp_t timestamp; /* aligned uint64_t timestamp */
WT_UPDATE *next; /* forward-linked list */
@@ -1069,10 +1067,6 @@ struct __wt_update {
((upd)->type == WT_UPDATE_STANDARD || \
(upd)->type == WT_UPDATE_TOMBSTONE)
-#if WT_TIMESTAMP_SIZE != 8
- WT_DECL_TIMESTAMP(timestamp) /* unaligned uint8_t array timestamp */
-#endif
-
/*
* The update state is used for transaction prepare to manage
* visibility and transitioning update structure state safely.
@@ -1091,7 +1085,7 @@ struct __wt_update {
* WT_UPDATE_SIZE is the expected structure size excluding the payload data --
* we verify the build to ensure the compiler hasn't inserted padding.
*/
-#define WT_UPDATE_SIZE (22 + WT_TIMESTAMP_SIZE)
+#define WT_UPDATE_SIZE 30
/*
* The memory size of an update: include some padding because this is such a
diff --git a/src/third_party/wiredtiger/src/include/btree.h b/src/third_party/wiredtiger/src/include/btree.h
index a44c010e51d..58aa69fb4e5 100644
--- a/src/third_party/wiredtiger/src/include/btree.h
+++ b/src/third_party/wiredtiger/src/include/btree.h
@@ -162,7 +162,7 @@ struct __wt_btree {
uint64_t write_gen; /* Write generation */
uint64_t rec_max_txn; /* Maximum txn seen (clean trees) */
- WT_DECL_TIMESTAMP(rec_max_timestamp)
+ wt_timestamp_t rec_max_timestamp;
uint64_t checkpoint_gen; /* Checkpoint generation */
WT_SESSION_IMPL *sync_session; /* Syncing session */
@@ -191,6 +191,7 @@ struct __wt_btree {
uint64_t bytes_inmem; /* Cache bytes in memory. */
uint64_t bytes_dirty_intl; /* Bytes in dirty internal pages. */
uint64_t bytes_dirty_leaf; /* Bytes in dirty leaf pages. */
+ uint64_t bytes_dirty_total; /* Bytes ever dirtied in cache. */
/*
* We flush pages from the tree (in order to make checkpoint faster),
diff --git a/src/third_party/wiredtiger/src/include/btree.i b/src/third_party/wiredtiger/src/include/btree.i
index 45fec2072d2..c9004138370 100644
--- a/src/third_party/wiredtiger/src/include/btree.i
+++ b/src/third_party/wiredtiger/src/include/btree.i
@@ -341,6 +341,8 @@ __wt_cache_dirty_incr(WT_SESSION_IMPL *session, WT_PAGE *page)
}
(void)__wt_atomic_add64(&cache->pages_dirty_leaf, 1);
}
+ (void)__wt_atomic_add64(&btree->bytes_dirty_total, size);
+ (void)__wt_atomic_add64(&cache->bytes_dirty_total, size);
(void)__wt_atomic_addsize(&page->modify->bytes_dirty, size);
}
@@ -1173,9 +1175,8 @@ __wt_page_del_active(WT_SESSION_IMPL *session, WT_REF *ref, bool visible_all)
return (true);
return (visible_all ?
!__wt_txn_visible_all(session,
- page_del->txnid, WT_TIMESTAMP_NULL(&page_del->timestamp)) :
- !__wt_txn_visible(session,
- page_del->txnid, WT_TIMESTAMP_NULL(&page_del->timestamp)));
+ page_del->txnid, page_del->timestamp) :
+ !__wt_txn_visible(session, page_del->txnid, page_del->timestamp));
}
/*
@@ -1192,7 +1193,7 @@ __wt_page_las_active(WT_SESSION_IMPL *session, WT_REF *ref)
if (!page_las->skew_newest || page_las->has_prepares)
return (true);
if (__wt_txn_visible_all(session, page_las->max_txn,
- WT_TIMESTAMP_NULL(&page_las->max_timestamp)))
+ page_las->max_timestamp))
return (false);
return (true);
@@ -1335,9 +1336,9 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page)
static inline bool
__wt_page_evict_retry(WT_SESSION_IMPL *session, WT_PAGE *page)
{
- WT_DECL_TIMESTAMP(pinned_ts)
WT_PAGE_MODIFY *mod;
WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t pinned_ts;
txn_global = &S2C(session)->txn_global;
@@ -1363,14 +1364,12 @@ __wt_page_evict_retry(WT_SESSION_IMPL *session, WT_PAGE *page)
mod->last_eviction_id != __wt_txn_oldest_id(session))
return (true);
-#ifdef HAVE_TIMESTAMPS
- if (__wt_timestamp_iszero(&mod->last_eviction_timestamp))
+ if (mod->last_eviction_timestamp == 0)
return (true);
__wt_txn_pinned_timestamp(session, &pinned_ts);
- if (__wt_timestamp_cmp(&pinned_ts, &mod->last_eviction_timestamp) > 0)
+ if (pinned_ts > mod->last_eviction_timestamp)
return (true);
-#endif
return (false);
}
@@ -1457,7 +1456,7 @@ __wt_page_can_evict(WT_SESSION_IMPL *session, WT_REF *ref, bool *inmem_splitp)
* evict, skip it.
*/
if (!modified && !__wt_txn_visible_all(session,
- mod->rec_max_txn, WT_TIMESTAMP_NULL(&mod->rec_max_timestamp)))
+ mod->rec_max_txn, mod->rec_max_timestamp))
return (false);
return (true);
diff --git a/src/third_party/wiredtiger/src/include/cache.h b/src/third_party/wiredtiger/src/include/cache.h
index 8afedb30832..183090a1d64 100644
--- a/src/third_party/wiredtiger/src/include/cache.h
+++ b/src/third_party/wiredtiger/src/include/cache.h
@@ -72,6 +72,7 @@ struct __wt_cache {
uint64_t bytes_dirty_intl; /* Bytes/pages currently dirty */
uint64_t pages_dirty_intl;
uint64_t bytes_dirty_leaf;
+ uint64_t bytes_dirty_total;
uint64_t pages_dirty_leaf;
uint64_t bytes_evict; /* Bytes/pages discarded by eviction */
uint64_t pages_evicted;
diff --git a/src/third_party/wiredtiger/src/include/cursor.h b/src/third_party/wiredtiger/src/include/cursor.h
index 36fb2d92ee1..55a4cdb7a13 100644
--- a/src/third_party/wiredtiger/src/include/cursor.h
+++ b/src/third_party/wiredtiger/src/include/cursor.h
@@ -227,18 +227,18 @@ struct __wt_cursor_btree {
#define WT_CBT_ITERATE_APPEND 0x002u /* Col-store: iterating append list */
#define WT_CBT_ITERATE_NEXT 0x004u /* Next iteration configuration */
#define WT_CBT_ITERATE_PREV 0x008u /* Prev iteration configuration */
-#define WT_CBT_NO_TXN 0x010u /* Non-txn cursor (e.g. a checkpoint) */
-#define WT_CBT_READ_ONCE 0x020u /* Page in with WT_READ_WONT_NEED */
-#define WT_CBT_RETRY_NEXT 0x040u /* Next, resulted in prepare conflict */
-#define WT_CBT_RETRY_PREV 0x080u /* Prev, resulted in prepare conflict */
+#define WT_CBT_ITERATE_RETRY_NEXT 0x010u /* Prepare conflict by next. */
+#define WT_CBT_ITERATE_RETRY_PREV 0x020u /* Prepare conflict by prev. */
+#define WT_CBT_NO_TXN 0x040u /* Non-txn cursor (e.g. a checkpoint) */
+#define WT_CBT_READ_ONCE 0x080u /* Page in with WT_READ_WONT_NEED */
#define WT_CBT_SEARCH_SMALLEST 0x100u /* Row-store: small-key insert list */
#define WT_CBT_VAR_ONPAGE_MATCH 0x200u /* Var-store: on-page recno match */
/* AUTOMATIC FLAG VALUE GENERATION STOP */
#define WT_CBT_POSITION_MASK /* Flags associated with position */ \
(WT_CBT_ITERATE_APPEND | WT_CBT_ITERATE_NEXT | WT_CBT_ITERATE_PREV | \
- WT_CBT_RETRY_NEXT | WT_CBT_RETRY_PREV | WT_CBT_SEARCH_SMALLEST | \
- WT_CBT_VAR_ONPAGE_MATCH)
+ WT_CBT_ITERATE_RETRY_NEXT | WT_CBT_ITERATE_RETRY_PREV | \
+ WT_CBT_SEARCH_SMALLEST | WT_CBT_VAR_ONPAGE_MATCH)
uint32_t flags;
};
@@ -487,6 +487,7 @@ struct __wt_cursor_stat {
WT_DSRC_STATS dsrc_stats;
WT_CONNECTION_STATS conn_stats;
WT_JOIN_STATS_GROUP join_stats_group;
+ WT_SESSION_STATS session_stats;
} u;
const char **cfg; /* Original cursor configuration */
diff --git a/src/third_party/wiredtiger/src/include/cursor.i b/src/third_party/wiredtiger/src/include/cursor.i
index daa633f86ba..1b301a3d28a 100644
--- a/src/third_party/wiredtiger/src/include/cursor.i
+++ b/src/third_party/wiredtiger/src/include/cursor.i
@@ -473,3 +473,30 @@ value:
__wt_row_leaf_value_cell(page, rip, kpack, vpack);
return (__wt_page_cell_data_ref(session, cbt->ref->page, vpack, vb));
}
+/*
+ * __cursor_check_prepared_update --
+ * Return whether prepared update at current position is visible or not.
+ */
+static inline int
+__cursor_check_prepared_update(WT_CURSOR_BTREE *cbt, bool *visiblep)
+{
+ WT_SESSION_IMPL *session;
+ WT_UPDATE *upd;
+
+ session = (WT_SESSION_IMPL *)cbt->iface.session;
+ /*
+ * When retrying an operation due to a prepared conflict, the cursor is
+ * at an update list which resulted in conflict. So, when retrying we
+ * should examine the same update again instead of iterating to the next
+ * object. We'll eventually find a valid update, else return
+ * prepare-conflict until resolved.
+ */
+ WT_RET(__wt_cursor_valid(cbt, &upd, visiblep));
+
+ /* The update that returned prepared conflict is now visible. */
+ F_CLR(cbt, WT_CBT_ITERATE_RETRY_NEXT | WT_CBT_ITERATE_RETRY_PREV);
+ if (*visiblep)
+ WT_RET(__cursor_kv_return(session, cbt, upd));
+
+ return (0);
+}
diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h
index e3b3296f405..ca7f0597f88 100644
--- a/src/third_party/wiredtiger/src/include/extern.h
+++ b/src/third_party/wiredtiger/src/include/extern.h
@@ -788,6 +788,9 @@ extern void __wt_stat_join_init_single(WT_JOIN_STATS *stats);
extern void __wt_stat_join_clear_single(WT_JOIN_STATS *stats);
extern void __wt_stat_join_clear_all(WT_JOIN_STATS **stats);
extern void __wt_stat_join_aggregate(WT_JOIN_STATS **from, WT_JOIN_STATS *to);
+extern int __wt_stat_session_desc(WT_CURSOR_STAT *cst, int slot, const char **p) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
+extern void __wt_stat_session_init_single(WT_SESSION_STATS *stats);
+extern void __wt_stat_session_clear_single(WT_SESSION_STATS *stats);
extern int __wt_thread_group_resize(WT_SESSION_IMPL *session, WT_THREAD_GROUP *group, uint32_t new_min, uint32_t new_max, uint32_t flags) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_thread_group_create(WT_SESSION_IMPL *session, WT_THREAD_GROUP *group, const char *name, uint32_t min, uint32_t max, uint32_t flags, bool (*chk_func)(WT_SESSION_IMPL *session), int (*run_func)(WT_SESSION_IMPL *session, WT_THREAD *context), int (*stop_func)(WT_SESSION_IMPL *session, WT_THREAD *context)) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_thread_group_destroy(WT_SESSION_IMPL *session, WT_THREAD_GROUP *group) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
@@ -842,14 +845,14 @@ extern int __wt_txn_named_snapshot_config(WT_SESSION_IMPL *session, const char *
extern void __wt_txn_named_snapshot_destroy(WT_SESSION_IMPL *session);
extern int __wt_txn_recover(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern int __wt_timestamp_to_hex_string(WT_SESSION_IMPL *session, char *hex_timestamp, const wt_timestamp_t *ts_src) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern void __wt_verbose_timestamp(WT_SESSION_IMPL *session, const wt_timestamp_t *ts, const char *msg);
+extern void __wt_timestamp_to_hex_string(char *hex_timestamp, wt_timestamp_t ts);
+extern void __wt_verbose_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t ts, const char *msg);
extern int __wt_txn_parse_timestamp_raw(WT_SESSION_IMPL *session, const char *name, wt_timestamp_t *timestamp, WT_CONFIG_ITEM *cval) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_parse_timestamp(WT_SESSION_IMPL *session, const char *name, wt_timestamp_t *timestamp, WT_CONFIG_ITEM *cval) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_query_timestamp(WT_SESSION_IMPL *session, char *hex_timestamp, const char *cfg[], bool global_txn) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_update_pinned_timestamp(WT_SESSION_IMPL *session, bool force) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern int __wt_timestamp_validate(WT_SESSION_IMPL *session, const char *name, wt_timestamp_t *ts, WT_CONFIG_ITEM *cval) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
+extern int __wt_timestamp_validate(WT_SESSION_IMPL *session, const char *name, wt_timestamp_t ts, WT_CONFIG_ITEM *cval) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_parse_prepare_timestamp(WT_SESSION_IMPL *session, const char *cfg[], wt_timestamp_t *timestamp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_txn_parse_read_timestamp(WT_SESSION_IMPL *session, const char *cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
diff --git a/src/third_party/wiredtiger/src/include/lsm.h b/src/third_party/wiredtiger/src/include/lsm.h
index 67ef28757ef..0945edb81a0 100644
--- a/src/third_party/wiredtiger/src/include/lsm.h
+++ b/src/third_party/wiredtiger/src/include/lsm.h
@@ -98,7 +98,7 @@ struct __wt_lsm_chunk {
* out, or by compact to get the most
* recent chunk flushed.
*/
- WT_DECL_TIMESTAMP(switch_timestamp)/*
+ wt_timestamp_t switch_timestamp;/*
* The timestamp used to decide when
* updates need to detect conflicts.
*/
diff --git a/src/third_party/wiredtiger/src/include/misc.h b/src/third_party/wiredtiger/src/include/misc.h
index 9e2108a6be2..9e9fc15fb52 100644
--- a/src/third_party/wiredtiger/src/include/misc.h
+++ b/src/third_party/wiredtiger/src/include/misc.h
@@ -273,30 +273,6 @@
(dst).size = (src).size; \
} while (0)
-/* Timestamp type and helper macros. */
-#if WT_TIMESTAMP_SIZE > 0
-#define HAVE_TIMESTAMPS
-#else
-#undef HAVE_TIMESTAMPS
-#endif
-
-#ifdef HAVE_TIMESTAMPS
-struct __wt_timestamp_t {
-#if WT_TIMESTAMP_SIZE == 8
- uint64_t val;
-#else
- uint8_t ts[WT_TIMESTAMP_SIZE];
-#endif
-};
-typedef struct __wt_timestamp_t wt_timestamp_t;
-#define WT_DECL_TIMESTAMP(x) wt_timestamp_t x;
-#define WT_TIMESTAMP_NULL(x) (x)
-#else
-typedef void wt_timestamp_t;
-#define WT_DECL_TIMESTAMP(x)
-#define WT_TIMESTAMP_NULL(x) (NULL)
-#endif
-
/*
* In diagnostic mode we track the locations from which hazard pointers and
* scratch buffers were acquired.
diff --git a/src/third_party/wiredtiger/src/include/misc.i b/src/third_party/wiredtiger/src/include/misc.i
index 4a34b5211d8..7142fc26817 100644
--- a/src/third_party/wiredtiger/src/include/misc.i
+++ b/src/third_party/wiredtiger/src/include/misc.i
@@ -195,14 +195,10 @@ __wt_snprintf_len_incr(
static inline int
__wt_txn_context_prepare_check(WT_SESSION_IMPL *session)
{
-#ifdef HAVE_TIMESTAMPS
if (F_ISSET(&session->txn, WT_TXN_PREPARE))
WT_RET_MSG(session, EINVAL,
"%s: not permitted in a prepared transaction",
session->name);
-#else
- WT_UNUSED(session);
-#endif
return (0);
}
diff --git a/src/third_party/wiredtiger/src/include/serial.i b/src/third_party/wiredtiger/src/include/serial.i
index 02f15cdb8af..21966dfab79 100644
--- a/src/third_party/wiredtiger/src/include/serial.i
+++ b/src/third_party/wiredtiger/src/include/serial.i
@@ -265,7 +265,7 @@ __wt_update_serial(WT_SESSION_IMPL *session, WT_PAGE *page,
{
WT_DECL_RET;
WT_UPDATE *obsolete, *upd;
- wt_timestamp_t *obsolete_timestamp;
+ wt_timestamp_t obsolete_timestamp;
size_t size;
uint64_t txn;
@@ -314,8 +314,7 @@ __wt_update_serial(WT_SESSION_IMPL *session, WT_PAGE *page,
* is used as an indicator of there being further updates on this page.
*/
if ((txn = page->modify->obsolete_check_txn) != WT_TXN_NONE) {
- obsolete_timestamp =
- WT_TIMESTAMP_NULL(&page->modify->obsolete_check_timestamp);
+ obsolete_timestamp = page->modify->obsolete_check_timestamp;
if (!__wt_txn_visible_all(session, txn, obsolete_timestamp)) {
/* Try to move the oldest ID forward and re-check. */
WT_RET(__wt_txn_update_oldest(session, 0));
diff --git a/src/third_party/wiredtiger/src/include/session.h b/src/third_party/wiredtiger/src/include/session.h
index 10ff7bd48dc..092f2259edd 100644
--- a/src/third_party/wiredtiger/src/include/session.h
+++ b/src/third_party/wiredtiger/src/include/session.h
@@ -268,4 +268,6 @@ struct __wt_session_impl {
u_int optrackbuf_ptr;
uint64_t optrack_offset;
WT_FH *optrack_fh;
+
+ WT_SESSION_STATS stats;
};
diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h
index 3dca894a68c..3714d03d1ce 100644
--- a/src/third_party/wiredtiger/src/include/stat.h
+++ b/src/third_party/wiredtiger/src/include/stat.h
@@ -351,6 +351,7 @@ struct __wt_connection_stats {
int64_t cache_bytes_image;
int64_t cache_bytes_lookaside;
int64_t cache_bytes_inuse;
+ int64_t cache_bytes_dirty_total;
int64_t cache_bytes_other;
int64_t cache_bytes_read;
int64_t cache_bytes_write;
@@ -727,6 +728,7 @@ struct __wt_dsrc_stats {
int64_t btree_row_internal;
int64_t btree_row_leaf;
int64_t cache_bytes_inuse;
+ int64_t cache_bytes_dirty_total;
int64_t cache_bytes_read;
int64_t cache_bytes_write;
int64_t cache_eviction_checkpoint;
@@ -843,4 +845,18 @@ struct __wt_join_stats {
int64_t iterated;
};
+/*
+ * Statistics entries for session.
+ */
+#define WT_SESSION_STATS_BASE 4000
+struct __wt_session_stats {
+ int64_t bytes_read;
+ int64_t bytes_write;
+ int64_t lock_dhandle_wait;
+ int64_t read_time;
+ int64_t write_time;
+ int64_t lock_schema_wait;
+ int64_t cache_time;
+};
+
/* Statistics section: END */
diff --git a/src/third_party/wiredtiger/src/include/txn.h b/src/third_party/wiredtiger/src/include/txn.h
index c8ff4ec8cdb..8d093a81588 100644
--- a/src/third_party/wiredtiger/src/include/txn.h
+++ b/src/third_party/wiredtiger/src/include/txn.h
@@ -41,6 +41,10 @@
#define WT_SESSION_IS_CHECKPOINT(s) \
((s)->id != 0 && (s)->id == S2C(s)->txn_global.checkpoint_id)
+#define WT_TS_NONE 0 /* No timestamp */
+ /* Bytes to hold a hex timestamp */
+#define WT_TS_HEX_SIZE (2 * sizeof(wt_timestamp_t) + 1)
+
/*
* Perform an operation at the specified isolation level.
*
@@ -101,13 +105,13 @@ struct __wt_txn_global {
*/
volatile uint64_t oldest_id;
- WT_DECL_TIMESTAMP(commit_timestamp)
- WT_DECL_TIMESTAMP(last_ckpt_timestamp)
- WT_DECL_TIMESTAMP(meta_ckpt_timestamp)
- WT_DECL_TIMESTAMP(oldest_timestamp)
- WT_DECL_TIMESTAMP(pinned_timestamp)
- WT_DECL_TIMESTAMP(recovery_timestamp)
- WT_DECL_TIMESTAMP(stable_timestamp)
+ wt_timestamp_t commit_timestamp;
+ wt_timestamp_t last_ckpt_timestamp;
+ wt_timestamp_t meta_ckpt_timestamp;
+ wt_timestamp_t oldest_timestamp;
+ wt_timestamp_t pinned_timestamp;
+ wt_timestamp_t recovery_timestamp;
+ wt_timestamp_t stable_timestamp;
bool has_commit_timestamp;
bool has_oldest_timestamp;
bool has_pinned_timestamp;
@@ -147,7 +151,7 @@ struct __wt_txn_global {
volatile bool checkpoint_running; /* Checkpoint running */
volatile uint32_t checkpoint_id; /* Checkpoint's session ID */
WT_TXN_STATE checkpoint_state; /* Checkpoint's txn state */
- WT_DECL_TIMESTAMP(checkpoint_timestamp) /* Checkpoint's timestamp */
+ wt_timestamp_t checkpoint_timestamp; /* Checkpoint's timestamp */
volatile uint64_t metadata_pinned; /* Oldest ID for metadata */
@@ -249,22 +253,22 @@ struct __wt_txn {
* In some use cases, this can be updated while the transaction is
* running.
*/
- WT_DECL_TIMESTAMP(commit_timestamp)
+ wt_timestamp_t commit_timestamp;
/*
* Set to the first commit timestamp used in the transaction and fixed
* while the transaction is on the public list of committed timestamps.
*/
- WT_DECL_TIMESTAMP(first_commit_timestamp)
+ wt_timestamp_t first_commit_timestamp;
/*
* Timestamp copied into updates created by this transaction, when this
* transaction is prepared.
*/
- WT_DECL_TIMESTAMP(prepare_timestamp)
+ wt_timestamp_t prepare_timestamp;
/* Read updates committed as of this timestamp. */
- WT_DECL_TIMESTAMP(read_timestamp)
+ wt_timestamp_t read_timestamp;
TAILQ_ENTRY(__wt_txn) commit_timestampq;
TAILQ_ENTRY(__wt_txn) read_timestampq;
diff --git a/src/third_party/wiredtiger/src/include/txn.i b/src/third_party/wiredtiger/src/include/txn.i
index 84cd0c27ef6..7de59e498d4 100644
--- a/src/third_party/wiredtiger/src/include/txn.i
+++ b/src/third_party/wiredtiger/src/include/txn.i
@@ -14,7 +14,7 @@ typedef enum {
WT_VISIBLE_PREPARE=1, /* Prepared update */
WT_VISIBLE_TRUE=2 /* A visible update */
} WT_VISIBLE_TYPE;
-#ifdef HAVE_TIMESTAMPS
+
/*
* __wt_txn_timestamp_flags --
* Set transaction related timestamp flags.
@@ -37,162 +37,6 @@ __wt_txn_timestamp_flags(WT_SESSION_IMPL *session)
F_SET(&session->txn, WT_TXN_TS_COMMIT_NEVER);
}
-#if WT_TIMESTAMP_SIZE == 8
-#define WT_WITH_TIMESTAMP_READLOCK(session, l, e) e
-
-/*
- * __wt_timestamp_cmp --
- * Compare two timestamps.
- */
-static inline int
-__wt_timestamp_cmp(const wt_timestamp_t *ts1, const wt_timestamp_t *ts2)
-{
- return (ts1->val == ts2->val ? 0 : (ts1->val > ts2->val ? 1 : -1));
-}
-
-/*
- * __wt_timestamp_set --
- * Set a timestamp.
- */
-static inline void
-__wt_timestamp_set(wt_timestamp_t *dest, const wt_timestamp_t *src)
-{
- dest->val = src->val;
-}
-
-/*
- * __wt_timestamp_subone --
- * Subtract one from a timestamp.
- */
-static inline void
-__wt_timestamp_subone(wt_timestamp_t *ts)
-{
- ts->val -= 1;
-}
-
-/*
- * __wt_timestamp_iszero --
- * Check if a timestamp is equal to the special "zero" time.
- */
-static inline bool
-__wt_timestamp_iszero(const wt_timestamp_t *ts)
-{
- return (ts->val == 0);
-}
-
-/*
- * __wt_timestamp_set_inf --
- * Set a timestamp to the maximum value.
- */
-static inline void
-__wt_timestamp_set_inf(wt_timestamp_t *ts)
-{
- ts->val = UINT64_MAX;
-}
-
-/*
- * __wt_timestamp_set_zero --
- * Zero out a timestamp.
- */
-static inline void
-__wt_timestamp_set_zero(wt_timestamp_t *ts)
-{
- ts->val = 0;
-}
-
-#else /* WT_TIMESTAMP_SIZE != 8 */
-
-#define WT_WITH_TIMESTAMP_READLOCK(s, l, e) do { \
- __wt_readlock((s), (l)); \
- e; \
- __wt_readunlock((s), (l)); \
-} while (0)
-
-/*
- * __wt_timestamp_cmp --
- * Compare two timestamps.
- */
-static inline int
-__wt_timestamp_cmp(const wt_timestamp_t *ts1, const wt_timestamp_t *ts2)
-{
- return (memcmp(ts1->ts, ts2->ts, WT_TIMESTAMP_SIZE));
-}
-
-/*
- * __wt_timestamp_set --
- * Set a timestamp.
- */
-static inline void
-__wt_timestamp_set(wt_timestamp_t *dest, const wt_timestamp_t *src)
-{
- (void)memcpy(dest->ts, src->ts, WT_TIMESTAMP_SIZE);
-}
-
-/*
- * __wt_timestamp_iszero --
- * Check if a timestamp is equal to the special "zero" time.
- */
-static inline bool
-__wt_timestamp_iszero(const wt_timestamp_t *ts)
-{
- static const wt_timestamp_t zero_timestamp;
-
- return (memcmp(ts->ts, &zero_timestamp, WT_TIMESTAMP_SIZE) == 0);
-}
-
-/*
- * __wt_timestamp_set_inf --
- * Set a timestamp to the maximum value.
- */
-static inline void
-__wt_timestamp_set_inf(wt_timestamp_t *ts)
-{
- memset(ts->ts, 0xff, WT_TIMESTAMP_SIZE);
-}
-
-/*
- * __wt_timestamp_set_zero --
- * Zero out a timestamp.
- */
-static inline void
-__wt_timestamp_set_zero(wt_timestamp_t *ts)
-{
- memset(ts->ts, 0x00, WT_TIMESTAMP_SIZE);
-}
-
-/*
- * __wt_timestamp_subone --
- * Subtract one from a timestamp.
- */
-static inline void
-__wt_timestamp_subone(wt_timestamp_t *ts)
-{
- uint8_t *tsb;
-
- /*
- * Complicated path for arbitrary-sized timestamps: start with the
- * least significant byte, subtract one, continue to more significant
- * bytes on underflow.
- */
- for (tsb = ts->ts + WT_TIMESTAMP_SIZE - 1; tsb >= ts->ts; --tsb)
- if (--*tsb != 0xff)
- break;
-}
-
-#endif /* WT_TIMESTAMP_SIZE == 8 */
-
-#else /* !HAVE_TIMESTAMPS */
-
-#define __wt_timestamp_set(dest, src)
-#define __wt_timestamp_set_inf(ts)
-#define __wt_timestamp_set_zero(ts)
-#define __wt_timestamp_subone(ts)
-#define __wt_txn_clear_commit_timestamp(session)
-#define __wt_txn_clear_read_timestamp(session)
-#define __wt_txn_timestamp_flags(session)
-
-#endif /* HAVE_TIMESTAMPS */
-
/*
* __wt_txn_op_set_recno --
* Set the latest transaction operation with the given recno.
@@ -271,7 +115,6 @@ __wt_txn_op_set_key(WT_SESSION_IMPL *session, const WT_ITEM *key)
static inline void
__txn_resolve_prepared_update(WT_SESSION_IMPL *session, WT_UPDATE *upd)
{
-#ifdef HAVE_TIMESTAMPS
WT_TXN *txn;
txn = &session->txn;
@@ -286,12 +129,8 @@ __txn_resolve_prepared_update(WT_SESSION_IMPL *session, WT_UPDATE *upd)
*/
upd->prepare_state = WT_PREPARE_LOCKED;
WT_WRITE_BARRIER();
- __wt_timestamp_set(&upd->timestamp, &txn->commit_timestamp);
+ upd->timestamp = txn->commit_timestamp;
WT_PUBLISH(upd->prepare_state, WT_PREPARE_RESOLVED);
-#else
- WT_UNUSED(session);
- WT_UNUSED(upd);
-#endif
}
/*
@@ -503,7 +342,6 @@ __wt_txn_unmodify(WT_SESSION_IMPL *session)
}
}
-#ifdef HAVE_TIMESTAMPS
/*
* __wt_txn_op_commit_page_del --
* Make the transaction ID and timestamp updates necessary to a ref that
@@ -536,7 +374,7 @@ __wt_txn_op_commit_page_del(WT_SESSION_IMPL *session, WT_REF *ref)
for (updp = ref->page_del->update_list;
updp != NULL && *updp != NULL; ++updp) {
- __wt_timestamp_set(&(*updp)->timestamp, &txn->commit_timestamp);
+ (*updp)->timestamp = txn->commit_timestamp;
if (F_ISSET(txn, WT_TXN_PREPARE))
/*
* Holding the ref locked means we have exclusive
@@ -593,11 +431,10 @@ __wt_txn_op_set_timestamp(WT_SESSION_IMPL *session, WT_TXN_OP *op)
*/
timestamp = op->type == WT_TXN_OP_REF_DELETE ?
&op->u.ref->page_del->timestamp : &op->u.op_upd->timestamp;
- if (__wt_timestamp_iszero(timestamp))
- __wt_timestamp_set(timestamp, &txn->commit_timestamp);
+ if (*timestamp == 0)
+ *timestamp = txn->commit_timestamp;
}
}
-#endif
/*
* __wt_txn_modify --
@@ -630,10 +467,7 @@ __wt_txn_modify(WT_SESSION_IMPL *session, WT_UPDATE *upd)
op->u.op_upd = upd;
upd->txnid = session->txn.id;
-#ifdef HAVE_TIMESTAMPS
__wt_txn_op_set_timestamp(session, op);
-#endif
-
return (0);
}
@@ -655,9 +489,7 @@ __wt_txn_modify_page_delete(WT_SESSION_IMPL *session, WT_REF *ref)
op->u.ref = ref;
ref->page_del->txnid = txn->id;
-#ifdef HAVE_TIMESTAMPS
__wt_txn_op_set_timestamp(session, op);
-#endif
WT_ERR(__wt_txn_log_op(session, NULL));
return (0);
@@ -726,7 +558,6 @@ __wt_txn_oldest_id(WT_SESSION_IMPL *session)
return (checkpoint_pinned);
}
-#ifdef HAVE_TIMESTAMPS
/*
* __wt_txn_pinned_timestamp --
* Get the first timestamp that has to be kept for the current tree.
@@ -742,9 +573,7 @@ __wt_txn_pinned_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t *pinned_tsp)
btree = S2BT_SAFE(session);
txn_global = &S2C(session)->txn_global;
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&pinned_ts, &txn_global->pinned_timestamp));
- __wt_timestamp_set(pinned_tsp, &pinned_ts);
+ *pinned_tsp = pinned_ts = txn_global->pinned_timestamp;
/*
* Checkpoint transactions often fall behind ordinary application
@@ -770,15 +599,11 @@ __wt_txn_pinned_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t *pinned_tsp)
*/
WT_READ_BARRIER();
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&checkpoint_ts,
- &txn_global->checkpoint_timestamp));
+ checkpoint_ts = txn_global->checkpoint_timestamp;
- if (!__wt_timestamp_iszero(&checkpoint_ts) &&
- __wt_timestamp_cmp(&checkpoint_ts, &pinned_ts) < 0)
- __wt_timestamp_set(pinned_tsp, &checkpoint_ts);
+ if (checkpoint_ts != 0 && checkpoint_ts < pinned_ts)
+ *pinned_tsp = checkpoint_ts;
}
-#endif
/*
* __txn_visible_all_id --
@@ -804,17 +629,15 @@ __txn_visible_all_id(WT_SESSION_IMPL *session, uint64_t id)
*/
static inline bool
__wt_txn_visible_all(
- WT_SESSION_IMPL *session, uint64_t id, const wt_timestamp_t *timestamp)
+ WT_SESSION_IMPL *session, uint64_t id, const wt_timestamp_t timestamp)
{
+ wt_timestamp_t pinned_ts;
+
if (!__txn_visible_all_id(session, id))
return (false);
-#ifdef HAVE_TIMESTAMPS
- {
- wt_timestamp_t pinned_ts;
-
/* Timestamp check. */
- if (timestamp == NULL || __wt_timestamp_iszero(timestamp))
+ if (timestamp == WT_TS_NONE)
return (true);
/*
@@ -825,12 +648,7 @@ __wt_txn_visible_all(
return (F_ISSET(S2C(session), WT_CONN_CLOSING));
__wt_txn_pinned_timestamp(session, &pinned_ts);
- return (__wt_timestamp_cmp(timestamp, &pinned_ts) <= 0);
- }
-#else
- WT_UNUSED(timestamp);
- return (true);
-#endif
+ return (timestamp <= pinned_ts);
}
/*
@@ -844,8 +662,7 @@ __wt_txn_upd_visible_all(WT_SESSION_IMPL *session, WT_UPDATE *upd)
upd->prepare_state == WT_PREPARE_INPROGRESS)
return (false);
- return (__wt_txn_visible_all(
- session, upd->txnid, WT_TIMESTAMP_NULL(&upd->timestamp)));
+ return (__wt_txn_visible_all(session, upd->txnid, upd->timestamp));
}
/*
@@ -907,8 +724,12 @@ __txn_visible_id(WT_SESSION_IMPL *session, uint64_t id)
*/
static inline bool
__wt_txn_visible(
- WT_SESSION_IMPL *session, uint64_t id, const wt_timestamp_t *timestamp)
+ WT_SESSION_IMPL *session, uint64_t id, const wt_timestamp_t timestamp)
{
+ WT_TXN *txn;
+
+ txn = &session->txn;
+
if (!__txn_visible_id(session, id))
return (false);
@@ -916,20 +737,11 @@ __wt_txn_visible(
if (F_ISSET(&session->txn, WT_TXN_HAS_ID) && id == session->txn.id)
return (true);
-#ifdef HAVE_TIMESTAMPS
- {
- WT_TXN *txn = &session->txn;
-
/* Timestamp check. */
- if (!F_ISSET(txn, WT_TXN_HAS_TS_READ) || timestamp == NULL)
+ if (!F_ISSET(txn, WT_TXN_HAS_TS_READ) || timestamp == WT_TS_NONE)
return (true);
- return (__wt_timestamp_cmp(timestamp, &txn->read_timestamp) <= 0);
- }
-#else
- WT_UNUSED(timestamp);
- return (true);
-#endif
+ return (timestamp <= txn->read_timestamp);
}
/*
@@ -949,7 +761,7 @@ __wt_txn_upd_visible_type(WT_SESSION_IMPL *session, WT_UPDATE *upd)
continue;
upd_visible = __wt_txn_visible(
- session, upd->txnid, WT_TIMESTAMP_NULL(&upd->timestamp));
+ session, upd->txnid, upd->timestamp);
/*
* The visibility check is only valid if the update does not
@@ -1196,7 +1008,6 @@ __wt_txn_id_check(WT_SESSION_IMPL *session)
static inline int
__wt_txn_search_check(WT_SESSION_IMPL *session)
{
-#ifdef HAVE_TIMESTAMPS
WT_BTREE *btree;
WT_TXN *txn;
@@ -1215,8 +1026,6 @@ __wt_txn_search_check(WT_SESSION_IMPL *session)
F_ISSET(txn, WT_TXN_PUBLIC_TS_READ))
WT_RET_MSG(session, EINVAL, "no read_timestamp required and "
"timestamp set on this transaction");
-#endif
- WT_UNUSED(session);
return (0);
}
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 76151082135..f04ad40693e 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -1902,8 +1902,7 @@ struct __wt_session {
* @param session the session handle
* @param[out] hex_timestamp a buffer that will be set to the
* hexadecimal encoding of the timestamp being queried. Must be large
- * enough to hold a hex-encoded timestamp (i.e., double the timestamp
- * size plus one byte for NUL termination).
+ * enough to hold a NUL terminated, hex-encoded 8B timestamp (17 bytes).
* @configstart{WT_SESSION.query_timestamp, see dist/api_data.py}
* @config{get, specify which timestamp to query: \c commit returns the
* most recently set commit_timestamp. \c first_commit returns the
@@ -2481,8 +2480,7 @@ struct __wt_connection {
* @param connection the connection handle
* @param[out] hex_timestamp a buffer that will be set to the
* hexadecimal encoding of the timestamp being queried. Must be large
- * enough to hold a hex-encoded timestamp (i.e., double the timestamp
- * size plus one byte for NUL termination).
+ * enough to hold a NUL terminated, hex-encoded 8B timestamp (17 bytes).
* @configstart{WT_CONNECTION.query_timestamp, see dist/api_data.py}
* @config{get, specify which timestamp to query: \c all_committed
* returns the largest timestamp such that all timestamps up to that
@@ -5058,725 +5056,727 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_CACHE_BYTES_LOOKASIDE 1036
/*! cache: bytes currently in the cache */
#define WT_STAT_CONN_CACHE_BYTES_INUSE 1037
+/*! cache: bytes dirty in the cache cumulative */
+#define WT_STAT_CONN_CACHE_BYTES_DIRTY_TOTAL 1038
/*! cache: bytes not belonging to page images in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_OTHER 1038
+#define WT_STAT_CONN_CACHE_BYTES_OTHER 1039
/*! cache: bytes read into cache */
-#define WT_STAT_CONN_CACHE_BYTES_READ 1039
+#define WT_STAT_CONN_CACHE_BYTES_READ 1040
/*! cache: bytes written from cache */
-#define WT_STAT_CONN_CACHE_BYTES_WRITE 1040
+#define WT_STAT_CONN_CACHE_BYTES_WRITE 1041
/*! cache: cache overflow cursor application thread wait time (usecs) */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_CURSOR_WAIT_APPLICATION 1041
+#define WT_STAT_CONN_CACHE_LOOKASIDE_CURSOR_WAIT_APPLICATION 1042
/*! cache: cache overflow cursor internal thread wait time (usecs) */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_CURSOR_WAIT_INTERNAL 1042
+#define WT_STAT_CONN_CACHE_LOOKASIDE_CURSOR_WAIT_INTERNAL 1043
/*! cache: cache overflow score */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_SCORE 1043
+#define WT_STAT_CONN_CACHE_LOOKASIDE_SCORE 1044
/*! cache: cache overflow table entries */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_ENTRIES 1044
+#define WT_STAT_CONN_CACHE_LOOKASIDE_ENTRIES 1045
/*! cache: cache overflow table insert calls */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_INSERT 1045
+#define WT_STAT_CONN_CACHE_LOOKASIDE_INSERT 1046
/*! cache: cache overflow table remove calls */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_REMOVE 1046
+#define WT_STAT_CONN_CACHE_LOOKASIDE_REMOVE 1047
/*! cache: checkpoint blocked page eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT 1047
+#define WT_STAT_CONN_CACHE_EVICTION_CHECKPOINT 1048
/*! cache: eviction calls to get a page */
-#define WT_STAT_CONN_CACHE_EVICTION_GET_REF 1048
+#define WT_STAT_CONN_CACHE_EVICTION_GET_REF 1049
/*! cache: eviction calls to get a page found queue empty */
-#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY 1049
+#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY 1050
/*! cache: eviction calls to get a page found queue empty after locking */
-#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1050
+#define WT_STAT_CONN_CACHE_EVICTION_GET_REF_EMPTY2 1051
/*! cache: eviction currently operating in aggressive mode */
-#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1051
+#define WT_STAT_CONN_CACHE_EVICTION_AGGRESSIVE_SET 1052
/*! cache: eviction empty score */
-#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1052
+#define WT_STAT_CONN_CACHE_EVICTION_EMPTY_SCORE 1053
/*! cache: eviction passes of a file */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES 1053
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_PASSES 1054
/*! cache: eviction server candidate queue empty when topping up */
-#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1054
+#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_EMPTY 1055
/*! cache: eviction server candidate queue not empty when topping up */
-#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1055
+#define WT_STAT_CONN_CACHE_EVICTION_QUEUE_NOT_EMPTY 1056
/*! cache: eviction server evicting pages */
-#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1056
+#define WT_STAT_CONN_CACHE_EVICTION_SERVER_EVICTING 1057
/*!
* cache: eviction server slept, because we did not make progress with
* eviction
*/
-#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1057
+#define WT_STAT_CONN_CACHE_EVICTION_SERVER_SLEPT 1058
/*! cache: eviction server unable to reach eviction goal */
-#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1058
+#define WT_STAT_CONN_CACHE_EVICTION_SLOW 1059
/*! cache: eviction state */
-#define WT_STAT_CONN_CACHE_EVICTION_STATE 1059
+#define WT_STAT_CONN_CACHE_EVICTION_STATE 1060
/*! cache: eviction walk target pages histogram - 0-9 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10 1060
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT10 1061
/*! cache: eviction walk target pages histogram - 10-31 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32 1061
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT32 1062
/*! cache: eviction walk target pages histogram - 128 and higher */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128 1062
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_GE128 1063
/*! cache: eviction walk target pages histogram - 32-63 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64 1063
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT64 1064
/*! cache: eviction walk target pages histogram - 64-128 */
-#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128 1064
+#define WT_STAT_CONN_CACHE_EVICTION_TARGET_PAGE_LT128 1065
/*! cache: eviction walks abandoned */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1065
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ABANDONED 1066
/*! cache: eviction walks gave up because they restarted their walk twice */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED 1066
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STOPPED 1067
/*!
* cache: eviction walks gave up because they saw too many pages and
* found no candidates
*/
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 1067
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 1068
/*!
* cache: eviction walks gave up because they saw too many pages and
* found too few candidates
*/
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 1068
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 1069
/*! cache: eviction walks reached end of tree */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED 1069
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ENDED 1070
/*! cache: eviction walks started from root of tree */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT 1070
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_FROM_ROOT 1071
/*! cache: eviction walks started from saved location in tree */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS 1071
+#define WT_STAT_CONN_CACHE_EVICTION_WALK_SAVED_POS 1072
/*! cache: eviction worker thread active */
-#define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS 1072
+#define WT_STAT_CONN_CACHE_EVICTION_ACTIVE_WORKERS 1073
/*! cache: eviction worker thread created */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED 1073
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_CREATED 1074
/*! cache: eviction worker thread evicting pages */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1074
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1075
/*! cache: eviction worker thread removed */
-#define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED 1075
+#define WT_STAT_CONN_CACHE_EVICTION_WORKER_REMOVED 1076
/*! cache: eviction worker thread stable number */
-#define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS 1076
+#define WT_STAT_CONN_CACHE_EVICTION_STABLE_STATE_WORKERS 1077
/*!
* cache: failed eviction of pages that exceeded the in-memory maximum
* count
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1077
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1078
/*!
* cache: failed eviction of pages that exceeded the in-memory maximum
* time (usecs)
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1078
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL_TIME 1079
/*! cache: files with active eviction walks */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1079
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1080
/*! cache: files with new eviction walks started */
-#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1080
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1081
/*! cache: force re-tuning of eviction workers once in a while */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE 1081
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_RETUNE 1082
/*! cache: hazard pointer blocked page eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1082
+#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1083
/*! cache: hazard pointer check calls */
-#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1083
+#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1084
/*! cache: hazard pointer check entries walked */
-#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1084
+#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1085
/*! cache: hazard pointer maximum array length */
-#define WT_STAT_CONN_CACHE_HAZARD_MAX 1085
+#define WT_STAT_CONN_CACHE_HAZARD_MAX 1086
/*! cache: in-memory page passed criteria to be split */
-#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1086
+#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1087
/*! cache: in-memory page splits */
-#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1087
+#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1088
/*! cache: internal pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1088
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1089
/*! cache: internal pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1089
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1090
/*! cache: leaf pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1090
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1091
/*! cache: maximum bytes configured */
-#define WT_STAT_CONN_CACHE_BYTES_MAX 1091
+#define WT_STAT_CONN_CACHE_BYTES_MAX 1092
/*! cache: maximum page size at eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1092
+#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1093
/*! cache: modified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1093
+#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1094
/*! cache: modified pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1094
+#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1095
/*! cache: operations timed out waiting for space in cache */
-#define WT_STAT_CONN_CACHE_TIMED_OUT_OPS 1095
+#define WT_STAT_CONN_CACHE_TIMED_OUT_OPS 1096
/*! cache: overflow pages read into cache */
-#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1096
+#define WT_STAT_CONN_CACHE_READ_OVERFLOW 1097
/*! cache: page split during eviction deepened the tree */
-#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1097
+#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1098
/*! cache: page written requiring cache overflow records */
-#define WT_STAT_CONN_CACHE_WRITE_LOOKASIDE 1098
+#define WT_STAT_CONN_CACHE_WRITE_LOOKASIDE 1099
/*! cache: pages currently held in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_INUSE 1099
+#define WT_STAT_CONN_CACHE_PAGES_INUSE 1100
/*! cache: pages evicted because they exceeded the in-memory maximum count */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1100
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1101
/*!
* cache: pages evicted because they exceeded the in-memory maximum time
* (usecs)
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_TIME 1101
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_TIME 1102
/*! cache: pages evicted because they had chains of deleted items count */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1102
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1103
/*!
* cache: pages evicted because they had chains of deleted items time
* (usecs)
*/
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE_TIME 1103
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE_TIME 1104
/*! cache: pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP 1104
+#define WT_STAT_CONN_CACHE_EVICTION_APP 1105
/*! cache: pages queued for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1105
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1106
/*! cache: pages queued for urgent eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1106
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_URGENT 1107
/*! cache: pages queued for urgent eviction during walk */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1107
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1108
/*! cache: pages read into cache */
-#define WT_STAT_CONN_CACHE_READ 1108
+#define WT_STAT_CONN_CACHE_READ 1109
/*! cache: pages read into cache after truncate */
-#define WT_STAT_CONN_CACHE_READ_DELETED 1109
+#define WT_STAT_CONN_CACHE_READ_DELETED 1110
/*! cache: pages read into cache after truncate in prepare state */
-#define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1110
+#define WT_STAT_CONN_CACHE_READ_DELETED_PREPARED 1111
/*! cache: pages read into cache requiring cache overflow entries */
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1111
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1112
/*! cache: pages read into cache requiring cache overflow for checkpoint */
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_CHECKPOINT 1112
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_CHECKPOINT 1113
/*! cache: pages read into cache skipping older cache overflow entries */
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_SKIPPED 1113
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_SKIPPED 1114
/*!
* cache: pages read into cache with skipped cache overflow entries
* needed later
*/
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY 1114
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY 1115
/*!
* cache: pages read into cache with skipped cache overflow entries
* needed later by checkpoint
*/
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY_CHECKPOINT 1115
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE_DELAY_CHECKPOINT 1116
/*! cache: pages requested from the cache */
-#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1116
+#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1117
/*! cache: pages seen by eviction walk */
-#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1117
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1118
/*! cache: pages selected for eviction unable to be evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1118
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1119
/*! cache: pages walked for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK 1119
+#define WT_STAT_CONN_CACHE_EVICTION_WALK 1120
/*! cache: pages written from cache */
-#define WT_STAT_CONN_CACHE_WRITE 1120
+#define WT_STAT_CONN_CACHE_WRITE 1121
/*! cache: pages written requiring in-memory restoration */
-#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1121
+#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1122
/*! cache: percentage overhead */
-#define WT_STAT_CONN_CACHE_OVERHEAD 1122
+#define WT_STAT_CONN_CACHE_OVERHEAD 1123
/*! cache: tracked bytes belonging to internal pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1123
+#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1124
/*! cache: tracked bytes belonging to leaf pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_LEAF 1124
+#define WT_STAT_CONN_CACHE_BYTES_LEAF 1125
/*! cache: tracked dirty bytes in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1125
+#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1126
/*! cache: tracked dirty pages in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1126
+#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1127
/*! cache: unmodified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1127
+#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1128
/*! connection: auto adjusting condition resets */
-#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1128
+#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1129
/*! connection: auto adjusting condition wait calls */
-#define WT_STAT_CONN_COND_AUTO_WAIT 1129
+#define WT_STAT_CONN_COND_AUTO_WAIT 1130
/*! connection: detected system time went backwards */
-#define WT_STAT_CONN_TIME_TRAVEL 1130
+#define WT_STAT_CONN_TIME_TRAVEL 1131
/*! connection: files currently open */
-#define WT_STAT_CONN_FILE_OPEN 1131
+#define WT_STAT_CONN_FILE_OPEN 1132
/*! connection: memory allocations */
-#define WT_STAT_CONN_MEMORY_ALLOCATION 1132
+#define WT_STAT_CONN_MEMORY_ALLOCATION 1133
/*! connection: memory frees */
-#define WT_STAT_CONN_MEMORY_FREE 1133
+#define WT_STAT_CONN_MEMORY_FREE 1134
/*! connection: memory re-allocations */
-#define WT_STAT_CONN_MEMORY_GROW 1134
+#define WT_STAT_CONN_MEMORY_GROW 1135
/*! connection: pthread mutex condition wait calls */
-#define WT_STAT_CONN_COND_WAIT 1135
+#define WT_STAT_CONN_COND_WAIT 1136
/*! connection: pthread mutex shared lock read-lock calls */
-#define WT_STAT_CONN_RWLOCK_READ 1136
+#define WT_STAT_CONN_RWLOCK_READ 1137
/*! connection: pthread mutex shared lock write-lock calls */
-#define WT_STAT_CONN_RWLOCK_WRITE 1137
+#define WT_STAT_CONN_RWLOCK_WRITE 1138
/*! connection: total fsync I/Os */
-#define WT_STAT_CONN_FSYNC_IO 1138
+#define WT_STAT_CONN_FSYNC_IO 1139
/*! connection: total read I/Os */
-#define WT_STAT_CONN_READ_IO 1139
+#define WT_STAT_CONN_READ_IO 1140
/*! connection: total write I/Os */
-#define WT_STAT_CONN_WRITE_IO 1140
+#define WT_STAT_CONN_WRITE_IO 1141
/*! cursor: cursor close calls that result in cache */
-#define WT_STAT_CONN_CURSOR_CACHE 1141
+#define WT_STAT_CONN_CURSOR_CACHE 1142
/*! cursor: cursor create calls */
-#define WT_STAT_CONN_CURSOR_CREATE 1142
+#define WT_STAT_CONN_CURSOR_CREATE 1143
/*! cursor: cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT 1143
+#define WT_STAT_CONN_CURSOR_INSERT 1144
/*! cursor: cursor modify calls */
-#define WT_STAT_CONN_CURSOR_MODIFY 1144
+#define WT_STAT_CONN_CURSOR_MODIFY 1145
/*! cursor: cursor next calls */
-#define WT_STAT_CONN_CURSOR_NEXT 1145
+#define WT_STAT_CONN_CURSOR_NEXT 1146
/*! cursor: cursor operation restarted */
-#define WT_STAT_CONN_CURSOR_RESTART 1146
+#define WT_STAT_CONN_CURSOR_RESTART 1147
/*! cursor: cursor prev calls */
-#define WT_STAT_CONN_CURSOR_PREV 1147
+#define WT_STAT_CONN_CURSOR_PREV 1148
/*! cursor: cursor remove calls */
-#define WT_STAT_CONN_CURSOR_REMOVE 1148
+#define WT_STAT_CONN_CURSOR_REMOVE 1149
/*! cursor: cursor reserve calls */
-#define WT_STAT_CONN_CURSOR_RESERVE 1149
+#define WT_STAT_CONN_CURSOR_RESERVE 1150
/*! cursor: cursor reset calls */
-#define WT_STAT_CONN_CURSOR_RESET 1150
+#define WT_STAT_CONN_CURSOR_RESET 1151
/*! cursor: cursor search calls */
-#define WT_STAT_CONN_CURSOR_SEARCH 1151
+#define WT_STAT_CONN_CURSOR_SEARCH 1152
/*! cursor: cursor search near calls */
-#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1152
+#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1153
/*! cursor: cursor sweep buckets */
-#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1153
+#define WT_STAT_CONN_CURSOR_SWEEP_BUCKETS 1154
/*! cursor: cursor sweep cursors closed */
-#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1154
+#define WT_STAT_CONN_CURSOR_SWEEP_CLOSED 1155
/*! cursor: cursor sweep cursors examined */
-#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1155
+#define WT_STAT_CONN_CURSOR_SWEEP_EXAMINED 1156
/*! cursor: cursor sweeps */
-#define WT_STAT_CONN_CURSOR_SWEEP 1156
+#define WT_STAT_CONN_CURSOR_SWEEP 1157
/*! cursor: cursor update calls */
-#define WT_STAT_CONN_CURSOR_UPDATE 1157
+#define WT_STAT_CONN_CURSOR_UPDATE 1158
/*! cursor: cursors currently cached */
-#define WT_STAT_CONN_CURSORS_CACHED 1158
+#define WT_STAT_CONN_CURSORS_CACHED 1159
/*! cursor: cursors reused from cache */
-#define WT_STAT_CONN_CURSOR_REOPEN 1159
+#define WT_STAT_CONN_CURSOR_REOPEN 1160
/*! cursor: truncate calls */
-#define WT_STAT_CONN_CURSOR_TRUNCATE 1160
+#define WT_STAT_CONN_CURSOR_TRUNCATE 1161
/*! data-handle: connection data handles currently active */
-#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1161
+#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1162
/*! data-handle: connection sweep candidate became referenced */
-#define WT_STAT_CONN_DH_SWEEP_REF 1162
+#define WT_STAT_CONN_DH_SWEEP_REF 1163
/*! data-handle: connection sweep dhandles closed */
-#define WT_STAT_CONN_DH_SWEEP_CLOSE 1163
+#define WT_STAT_CONN_DH_SWEEP_CLOSE 1164
/*! data-handle: connection sweep dhandles removed from hash list */
-#define WT_STAT_CONN_DH_SWEEP_REMOVE 1164
+#define WT_STAT_CONN_DH_SWEEP_REMOVE 1165
/*! data-handle: connection sweep time-of-death sets */
-#define WT_STAT_CONN_DH_SWEEP_TOD 1165
+#define WT_STAT_CONN_DH_SWEEP_TOD 1166
/*! data-handle: connection sweeps */
-#define WT_STAT_CONN_DH_SWEEPS 1166
+#define WT_STAT_CONN_DH_SWEEPS 1167
/*! data-handle: session dhandles swept */
-#define WT_STAT_CONN_DH_SESSION_HANDLES 1167
+#define WT_STAT_CONN_DH_SESSION_HANDLES 1168
/*! data-handle: session sweep attempts */
-#define WT_STAT_CONN_DH_SESSION_SWEEPS 1168
+#define WT_STAT_CONN_DH_SESSION_SWEEPS 1169
/*! lock: checkpoint lock acquisitions */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1169
+#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1170
/*! lock: checkpoint lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1170
+#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1171
/*! lock: checkpoint lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1171
+#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1172
/*!
* lock: commit timestamp queue lock application thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_APPLICATION 1172
+#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_APPLICATION 1173
/*! lock: commit timestamp queue lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_INTERNAL 1173
+#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WAIT_INTERNAL 1174
/*! lock: commit timestamp queue read lock acquisitions */
-#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_READ_COUNT 1174
+#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_READ_COUNT 1175
/*! lock: commit timestamp queue write lock acquisitions */
-#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WRITE_COUNT 1175
+#define WT_STAT_CONN_LOCK_COMMIT_TIMESTAMP_WRITE_COUNT 1176
/*! lock: dhandle lock application thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1176
+#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_APPLICATION 1177
/*! lock: dhandle lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1177
+#define WT_STAT_CONN_LOCK_DHANDLE_WAIT_INTERNAL 1178
/*! lock: dhandle read lock acquisitions */
-#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1178
+#define WT_STAT_CONN_LOCK_DHANDLE_READ_COUNT 1179
/*! lock: dhandle write lock acquisitions */
-#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1179
+#define WT_STAT_CONN_LOCK_DHANDLE_WRITE_COUNT 1180
/*! lock: metadata lock acquisitions */
-#define WT_STAT_CONN_LOCK_METADATA_COUNT 1180
+#define WT_STAT_CONN_LOCK_METADATA_COUNT 1181
/*! lock: metadata lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1181
+#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1182
/*! lock: metadata lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1182
+#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1183
/*!
* lock: read timestamp queue lock application thread time waiting
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1183
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_APPLICATION 1184
/*! lock: read timestamp queue lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1184
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WAIT_INTERNAL 1185
/*! lock: read timestamp queue read lock acquisitions */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1185
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_READ_COUNT 1186
/*! lock: read timestamp queue write lock acquisitions */
-#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1186
+#define WT_STAT_CONN_LOCK_READ_TIMESTAMP_WRITE_COUNT 1187
/*! lock: schema lock acquisitions */
-#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1187
+#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1188
/*! lock: schema lock application thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1188
+#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1189
/*! lock: schema lock internal thread wait time (usecs) */
-#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1189
+#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1190
/*!
* lock: table lock application thread time waiting for the table lock
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1190
+#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1191
/*!
* lock: table lock internal thread time waiting for the table lock
* (usecs)
*/
-#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1191
+#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1192
/*! lock: table read lock acquisitions */
-#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1192
+#define WT_STAT_CONN_LOCK_TABLE_READ_COUNT 1193
/*! lock: table write lock acquisitions */
-#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1193
+#define WT_STAT_CONN_LOCK_TABLE_WRITE_COUNT 1194
/*! lock: txn global lock application thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1194
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_APPLICATION 1195
/*! lock: txn global lock internal thread time waiting (usecs) */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1195
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WAIT_INTERNAL 1196
/*! lock: txn global read lock acquisitions */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1196
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_READ_COUNT 1197
/*! lock: txn global write lock acquisitions */
-#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1197
+#define WT_STAT_CONN_LOCK_TXN_GLOBAL_WRITE_COUNT 1198
/*! log: busy returns attempting to switch slots */
-#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1198
+#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1199
/*! log: force archive time sleeping (usecs) */
-#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1199
+#define WT_STAT_CONN_LOG_FORCE_ARCHIVE_SLEEP 1200
/*! log: log bytes of payload data */
-#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1200
+#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1201
/*! log: log bytes written */
-#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1201
+#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1202
/*! log: log files manually zero-filled */
-#define WT_STAT_CONN_LOG_ZERO_FILLS 1202
+#define WT_STAT_CONN_LOG_ZERO_FILLS 1203
/*! log: log flush operations */
-#define WT_STAT_CONN_LOG_FLUSH 1203
+#define WT_STAT_CONN_LOG_FLUSH 1204
/*! log: log force write operations */
-#define WT_STAT_CONN_LOG_FORCE_WRITE 1204
+#define WT_STAT_CONN_LOG_FORCE_WRITE 1205
/*! log: log force write operations skipped */
-#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1205
+#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1206
/*! log: log records compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1206
+#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1207
/*! log: log records not compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1207
+#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1208
/*! log: log records too small to compress */
-#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1208
+#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1209
/*! log: log release advances write LSN */
-#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1209
+#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1210
/*! log: log scan operations */
-#define WT_STAT_CONN_LOG_SCANS 1210
+#define WT_STAT_CONN_LOG_SCANS 1211
/*! log: log scan records requiring two reads */
-#define WT_STAT_CONN_LOG_SCAN_REREADS 1211
+#define WT_STAT_CONN_LOG_SCAN_REREADS 1212
/*! log: log server thread advances write LSN */
-#define WT_STAT_CONN_LOG_WRITE_LSN 1212
+#define WT_STAT_CONN_LOG_WRITE_LSN 1213
/*! log: log server thread write LSN walk skipped */
-#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1213
+#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1214
/*! log: log sync operations */
-#define WT_STAT_CONN_LOG_SYNC 1214
+#define WT_STAT_CONN_LOG_SYNC 1215
/*! log: log sync time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DURATION 1215
+#define WT_STAT_CONN_LOG_SYNC_DURATION 1216
/*! log: log sync_dir operations */
-#define WT_STAT_CONN_LOG_SYNC_DIR 1216
+#define WT_STAT_CONN_LOG_SYNC_DIR 1217
/*! log: log sync_dir time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1217
+#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1218
/*! log: log write operations */
-#define WT_STAT_CONN_LOG_WRITES 1218
+#define WT_STAT_CONN_LOG_WRITES 1219
/*! log: logging bytes consolidated */
-#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1219
+#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1220
/*! log: maximum log file size */
-#define WT_STAT_CONN_LOG_MAX_FILESIZE 1220
+#define WT_STAT_CONN_LOG_MAX_FILESIZE 1221
/*! log: number of pre-allocated log files to create */
-#define WT_STAT_CONN_LOG_PREALLOC_MAX 1221
+#define WT_STAT_CONN_LOG_PREALLOC_MAX 1222
/*! log: pre-allocated log files not ready and missed */
-#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1222
+#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1223
/*! log: pre-allocated log files prepared */
-#define WT_STAT_CONN_LOG_PREALLOC_FILES 1223
+#define WT_STAT_CONN_LOG_PREALLOC_FILES 1224
/*! log: pre-allocated log files used */
-#define WT_STAT_CONN_LOG_PREALLOC_USED 1224
+#define WT_STAT_CONN_LOG_PREALLOC_USED 1225
/*! log: records processed by log scan */
-#define WT_STAT_CONN_LOG_SCAN_RECORDS 1225
+#define WT_STAT_CONN_LOG_SCAN_RECORDS 1226
/*! log: slot close lost race */
-#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1226
+#define WT_STAT_CONN_LOG_SLOT_CLOSE_RACE 1227
/*! log: slot close unbuffered waits */
-#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1227
+#define WT_STAT_CONN_LOG_SLOT_CLOSE_UNBUF 1228
/*! log: slot closures */
-#define WT_STAT_CONN_LOG_SLOT_CLOSES 1228
+#define WT_STAT_CONN_LOG_SLOT_CLOSES 1229
/*! log: slot join atomic update races */
-#define WT_STAT_CONN_LOG_SLOT_RACES 1229
+#define WT_STAT_CONN_LOG_SLOT_RACES 1230
/*! log: slot join calls atomic updates raced */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1230
+#define WT_STAT_CONN_LOG_SLOT_YIELD_RACE 1231
/*! log: slot join calls did not yield */
-#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1231
+#define WT_STAT_CONN_LOG_SLOT_IMMEDIATE 1232
/*! log: slot join calls found active slot closed */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1232
+#define WT_STAT_CONN_LOG_SLOT_YIELD_CLOSE 1233
/*! log: slot join calls slept */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1233
+#define WT_STAT_CONN_LOG_SLOT_YIELD_SLEEP 1234
/*! log: slot join calls yielded */
-#define WT_STAT_CONN_LOG_SLOT_YIELD 1234
+#define WT_STAT_CONN_LOG_SLOT_YIELD 1235
/*! log: slot join found active slot closed */
-#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1235
+#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1236
/*! log: slot joins yield time (usecs) */
-#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1236
+#define WT_STAT_CONN_LOG_SLOT_YIELD_DURATION 1237
/*! log: slot transitions unable to find free slot */
-#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1237
+#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1238
/*! log: slot unbuffered writes */
-#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1238
+#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1239
/*! log: total in-memory size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_MEM 1239
+#define WT_STAT_CONN_LOG_COMPRESS_MEM 1240
/*! log: total log buffer size */
-#define WT_STAT_CONN_LOG_BUFFER_SIZE 1240
+#define WT_STAT_CONN_LOG_BUFFER_SIZE 1241
/*! log: total size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_LEN 1241
+#define WT_STAT_CONN_LOG_COMPRESS_LEN 1242
/*! log: written slots coalesced */
-#define WT_STAT_CONN_LOG_SLOT_COALESCED 1242
+#define WT_STAT_CONN_LOG_SLOT_COALESCED 1243
/*! log: yields waiting for previous log file close */
-#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1243
+#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1244
/*! perf: file system read latency histogram (bucket 1) - 10-49ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1244
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT50 1245
/*! perf: file system read latency histogram (bucket 2) - 50-99ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1245
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT100 1246
/*! perf: file system read latency histogram (bucket 3) - 100-249ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1246
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT250 1247
/*! perf: file system read latency histogram (bucket 4) - 250-499ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1247
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT500 1248
/*! perf: file system read latency histogram (bucket 5) - 500-999ms */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1248
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_LT1000 1249
/*! perf: file system read latency histogram (bucket 6) - 1000ms+ */
-#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1249
+#define WT_STAT_CONN_PERF_HIST_FSREAD_LATENCY_GT1000 1250
/*! perf: file system write latency histogram (bucket 1) - 10-49ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1250
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT50 1251
/*! perf: file system write latency histogram (bucket 2) - 50-99ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1251
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT100 1252
/*! perf: file system write latency histogram (bucket 3) - 100-249ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1252
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT250 1253
/*! perf: file system write latency histogram (bucket 4) - 250-499ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1253
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT500 1254
/*! perf: file system write latency histogram (bucket 5) - 500-999ms */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1254
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_LT1000 1255
/*! perf: file system write latency histogram (bucket 6) - 1000ms+ */
-#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1255
+#define WT_STAT_CONN_PERF_HIST_FSWRITE_LATENCY_GT1000 1256
/*! perf: operation read latency histogram (bucket 1) - 100-249us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1256
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT250 1257
/*! perf: operation read latency histogram (bucket 2) - 250-499us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1257
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT500 1258
/*! perf: operation read latency histogram (bucket 3) - 500-999us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1258
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT1000 1259
/*! perf: operation read latency histogram (bucket 4) - 1000-9999us */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1259
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_LT10000 1260
/*! perf: operation read latency histogram (bucket 5) - 10000us+ */
-#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1260
+#define WT_STAT_CONN_PERF_HIST_OPREAD_LATENCY_GT10000 1261
/*! perf: operation write latency histogram (bucket 1) - 100-249us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1261
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT250 1262
/*! perf: operation write latency histogram (bucket 2) - 250-499us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1262
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT500 1263
/*! perf: operation write latency histogram (bucket 3) - 500-999us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1263
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT1000 1264
/*! perf: operation write latency histogram (bucket 4) - 1000-9999us */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1264
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_LT10000 1265
/*! perf: operation write latency histogram (bucket 5) - 10000us+ */
-#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1265
+#define WT_STAT_CONN_PERF_HIST_OPWRITE_LATENCY_GT10000 1266
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1266
+#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1267
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_CONN_REC_PAGES 1267
+#define WT_STAT_CONN_REC_PAGES 1268
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_CONN_REC_PAGES_EVICTION 1268
+#define WT_STAT_CONN_REC_PAGES_EVICTION 1269
/*! reconciliation: pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE 1269
+#define WT_STAT_CONN_REC_PAGE_DELETE 1270
/*! reconciliation: split bytes currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1270
+#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1271
/*! reconciliation: split objects currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1271
+#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1272
/*! session: open cursor count */
-#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1272
+#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1273
/*! session: open session count */
-#define WT_STAT_CONN_SESSION_OPEN 1273
+#define WT_STAT_CONN_SESSION_OPEN 1274
/*! session: session query timestamp calls */
-#define WT_STAT_CONN_SESSION_QUERY_TS 1274
+#define WT_STAT_CONN_SESSION_QUERY_TS 1275
/*! session: table alter failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1275
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1276
/*! session: table alter successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1276
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1277
/*! session: table alter unchanged and skipped */
-#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1277
+#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1278
/*! session: table compact failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1278
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1279
/*! session: table compact successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1279
+#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1280
/*! session: table create failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1280
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1281
/*! session: table create successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1281
+#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1282
/*! session: table drop failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1282
+#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1283
/*! session: table drop successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1283
+#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1284
/*! session: table rebalance failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1284
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1285
/*! session: table rebalance successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1285
+#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1286
/*! session: table rename failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1286
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1287
/*! session: table rename successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1287
+#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1288
/*! session: table salvage failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1288
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1289
/*! session: table salvage successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1289
+#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1290
/*! session: table truncate failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1290
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1291
/*! session: table truncate successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1291
+#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1292
/*! session: table verify failed calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1292
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1293
/*! session: table verify successful calls */
-#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1293
+#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1294
/*! thread-state: active filesystem fsync calls */
-#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1294
+#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1295
/*! thread-state: active filesystem read calls */
-#define WT_STAT_CONN_THREAD_READ_ACTIVE 1295
+#define WT_STAT_CONN_THREAD_READ_ACTIVE 1296
/*! thread-state: active filesystem write calls */
-#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1296
+#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1297
/*! thread-yield: application thread time evicting (usecs) */
-#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1297
+#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1298
/*! thread-yield: application thread time waiting for cache (usecs) */
-#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1298
+#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1299
/*!
* thread-yield: connection close blocked waiting for transaction state
* stabilization
*/
-#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1299
+#define WT_STAT_CONN_TXN_RELEASE_BLOCKED 1300
/*! thread-yield: connection close yielded for lsm manager shutdown */
-#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1300
+#define WT_STAT_CONN_CONN_CLOSE_BLOCKED_LSM 1301
/*! thread-yield: data handle lock yielded */
-#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1301
+#define WT_STAT_CONN_DHANDLE_LOCK_BLOCKED 1302
/*!
* thread-yield: get reference for page index and slot time sleeping
* (usecs)
*/
-#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1302
+#define WT_STAT_CONN_PAGE_INDEX_SLOT_REF_BLOCKED 1303
/*! thread-yield: log server sync yielded for log write */
-#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1303
+#define WT_STAT_CONN_LOG_SERVER_SYNC_BLOCKED 1304
/*! thread-yield: page access yielded due to prepare state change */
-#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1304
+#define WT_STAT_CONN_PREPARED_TRANSITION_BLOCKED_PAGE 1305
/*! thread-yield: page acquire busy blocked */
-#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1305
+#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1306
/*! thread-yield: page acquire eviction blocked */
-#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1306
+#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1307
/*! thread-yield: page acquire locked blocked */
-#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1307
+#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1308
/*! thread-yield: page acquire read blocked */
-#define WT_STAT_CONN_PAGE_READ_BLOCKED 1308
+#define WT_STAT_CONN_PAGE_READ_BLOCKED 1309
/*! thread-yield: page acquire time sleeping (usecs) */
-#define WT_STAT_CONN_PAGE_SLEEP 1309
+#define WT_STAT_CONN_PAGE_SLEEP 1310
/*!
* thread-yield: page delete rollback time sleeping for state change
* (usecs)
*/
-#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1310
+#define WT_STAT_CONN_PAGE_DEL_ROLLBACK_BLOCKED 1311
/*! thread-yield: page reconciliation yielded due to child modification */
-#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1311
+#define WT_STAT_CONN_CHILD_MODIFY_BLOCKED_PAGE 1312
/*! transaction: Number of prepared updates */
-#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1312
+#define WT_STAT_CONN_TXN_PREPARED_UPDATES_COUNT 1313
/*! transaction: Number of prepared updates added to cache overflow */
-#define WT_STAT_CONN_TXN_PREPARED_UPDATES_LOOKASIDE_INSERTS 1313
+#define WT_STAT_CONN_TXN_PREPARED_UPDATES_LOOKASIDE_INSERTS 1314
/*! transaction: Number of prepared updates resolved */
-#define WT_STAT_CONN_TXN_PREPARED_UPDATES_RESOLVED 1314
+#define WT_STAT_CONN_TXN_PREPARED_UPDATES_RESOLVED 1315
/*! transaction: commit timestamp queue entries walked */
-#define WT_STAT_CONN_TXN_COMMIT_QUEUE_WALKED 1315
+#define WT_STAT_CONN_TXN_COMMIT_QUEUE_WALKED 1316
/*! transaction: commit timestamp queue insert to empty */
-#define WT_STAT_CONN_TXN_COMMIT_QUEUE_EMPTY 1316
+#define WT_STAT_CONN_TXN_COMMIT_QUEUE_EMPTY 1317
/*! transaction: commit timestamp queue inserts to head */
-#define WT_STAT_CONN_TXN_COMMIT_QUEUE_HEAD 1317
+#define WT_STAT_CONN_TXN_COMMIT_QUEUE_HEAD 1318
/*! transaction: commit timestamp queue inserts total */
-#define WT_STAT_CONN_TXN_COMMIT_QUEUE_INSERTS 1318
+#define WT_STAT_CONN_TXN_COMMIT_QUEUE_INSERTS 1319
/*! transaction: commit timestamp queue length */
-#define WT_STAT_CONN_TXN_COMMIT_QUEUE_LEN 1319
+#define WT_STAT_CONN_TXN_COMMIT_QUEUE_LEN 1320
/*! transaction: number of named snapshots created */
-#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1320
+#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1321
/*! transaction: number of named snapshots dropped */
-#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1321
+#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1322
/*! transaction: prepared transactions */
-#define WT_STAT_CONN_TXN_PREPARE 1322
+#define WT_STAT_CONN_TXN_PREPARE 1323
/*! transaction: prepared transactions committed */
-#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1323
+#define WT_STAT_CONN_TXN_PREPARE_COMMIT 1324
/*! transaction: prepared transactions currently active */
-#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1324
+#define WT_STAT_CONN_TXN_PREPARE_ACTIVE 1325
/*! transaction: prepared transactions rolled back */
-#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1325
+#define WT_STAT_CONN_TXN_PREPARE_ROLLBACK 1326
/*! transaction: query timestamp calls */
-#define WT_STAT_CONN_TXN_QUERY_TS 1326
+#define WT_STAT_CONN_TXN_QUERY_TS 1327
/*! transaction: read timestamp queue entries walked */
-#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1327
+#define WT_STAT_CONN_TXN_READ_QUEUE_WALKED 1328
/*! transaction: read timestamp queue insert to empty */
-#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1328
+#define WT_STAT_CONN_TXN_READ_QUEUE_EMPTY 1329
/*! transaction: read timestamp queue inserts to head */
-#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1329
+#define WT_STAT_CONN_TXN_READ_QUEUE_HEAD 1330
/*! transaction: read timestamp queue inserts total */
-#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1330
+#define WT_STAT_CONN_TXN_READ_QUEUE_INSERTS 1331
/*! transaction: read timestamp queue length */
-#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1331
+#define WT_STAT_CONN_TXN_READ_QUEUE_LEN 1332
/*! transaction: rollback to stable calls */
-#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE 1332
+#define WT_STAT_CONN_TXN_ROLLBACK_TO_STABLE 1333
/*! transaction: rollback to stable updates aborted */
-#define WT_STAT_CONN_TXN_ROLLBACK_UPD_ABORTED 1333
+#define WT_STAT_CONN_TXN_ROLLBACK_UPD_ABORTED 1334
/*! transaction: rollback to stable updates removed from cache overflow */
-#define WT_STAT_CONN_TXN_ROLLBACK_LAS_REMOVED 1334
+#define WT_STAT_CONN_TXN_ROLLBACK_LAS_REMOVED 1335
/*! transaction: set timestamp calls */
-#define WT_STAT_CONN_TXN_SET_TS 1335
+#define WT_STAT_CONN_TXN_SET_TS 1336
/*! transaction: set timestamp commit calls */
-#define WT_STAT_CONN_TXN_SET_TS_COMMIT 1336
+#define WT_STAT_CONN_TXN_SET_TS_COMMIT 1337
/*! transaction: set timestamp commit updates */
-#define WT_STAT_CONN_TXN_SET_TS_COMMIT_UPD 1337
+#define WT_STAT_CONN_TXN_SET_TS_COMMIT_UPD 1338
/*! transaction: set timestamp oldest calls */
-#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1338
+#define WT_STAT_CONN_TXN_SET_TS_OLDEST 1339
/*! transaction: set timestamp oldest updates */
-#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1339
+#define WT_STAT_CONN_TXN_SET_TS_OLDEST_UPD 1340
/*! transaction: set timestamp stable calls */
-#define WT_STAT_CONN_TXN_SET_TS_STABLE 1340
+#define WT_STAT_CONN_TXN_SET_TS_STABLE 1341
/*! transaction: set timestamp stable updates */
-#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1341
+#define WT_STAT_CONN_TXN_SET_TS_STABLE_UPD 1342
/*! transaction: transaction begins */
-#define WT_STAT_CONN_TXN_BEGIN 1342
+#define WT_STAT_CONN_TXN_BEGIN 1343
/*! transaction: transaction checkpoint currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1343
+#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1344
/*! transaction: transaction checkpoint generation */
-#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1344
+#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1345
/*! transaction: transaction checkpoint max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1345
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1346
/*! transaction: transaction checkpoint min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1346
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1347
/*! transaction: transaction checkpoint most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1347
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1348
/*! transaction: transaction checkpoint scrub dirty target */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1348
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1349
/*! transaction: transaction checkpoint scrub time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1349
+#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1350
/*! transaction: transaction checkpoint total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1350
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1351
/*! transaction: transaction checkpoints */
-#define WT_STAT_CONN_TXN_CHECKPOINT 1351
+#define WT_STAT_CONN_TXN_CHECKPOINT 1352
/*!
* transaction: transaction checkpoints skipped because database was
* clean
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1352
+#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1353
/*! transaction: transaction failures due to cache overflow */
-#define WT_STAT_CONN_TXN_FAIL_CACHE 1353
+#define WT_STAT_CONN_TXN_FAIL_CACHE 1354
/*!
* transaction: transaction fsync calls for checkpoint after allocating
* the transaction ID
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1354
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1355
/*!
* transaction: transaction fsync duration for checkpoint after
* allocating the transaction ID (usecs)
*/
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1355
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1356
/*! transaction: transaction range of IDs currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_RANGE 1356
+#define WT_STAT_CONN_TXN_PINNED_RANGE 1357
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1357
+#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1358
/*!
* transaction: transaction range of IDs currently pinned by named
* snapshots
*/
-#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1358
+#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1359
/*! transaction: transaction range of timestamps currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1359
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP 1360
/*! transaction: transaction range of timestamps pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1360
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_CHECKPOINT 1361
/*!
* transaction: transaction range of timestamps pinned by the oldest
* timestamp
*/
-#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1361
+#define WT_STAT_CONN_TXN_PINNED_TIMESTAMP_OLDEST 1362
/*! transaction: transaction sync calls */
-#define WT_STAT_CONN_TXN_SYNC 1362
+#define WT_STAT_CONN_TXN_SYNC 1363
/*! transaction: transactions committed */
-#define WT_STAT_CONN_TXN_COMMIT 1363
+#define WT_STAT_CONN_TXN_COMMIT 1364
/*! transaction: transactions rolled back */
-#define WT_STAT_CONN_TXN_ROLLBACK 1364
+#define WT_STAT_CONN_TXN_ROLLBACK 1365
/*! transaction: update conflicts */
-#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1365
+#define WT_STAT_CONN_TXN_UPDATE_CONFLICT 1366
/*!
* @}
@@ -5896,286 +5896,288 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_DSRC_BTREE_ROW_LEAF 2039
/*! cache: bytes currently in the cache */
#define WT_STAT_DSRC_CACHE_BYTES_INUSE 2040
+/*! cache: bytes dirty in the cache cumulative */
+#define WT_STAT_DSRC_CACHE_BYTES_DIRTY_TOTAL 2041
/*! cache: bytes read into cache */
-#define WT_STAT_DSRC_CACHE_BYTES_READ 2041
+#define WT_STAT_DSRC_CACHE_BYTES_READ 2042
/*! cache: bytes written from cache */
-#define WT_STAT_DSRC_CACHE_BYTES_WRITE 2042
+#define WT_STAT_DSRC_CACHE_BYTES_WRITE 2043
/*! cache: checkpoint blocked page eviction */
-#define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT 2043
+#define WT_STAT_DSRC_CACHE_EVICTION_CHECKPOINT 2044
/*! cache: data source pages selected for eviction unable to be evicted */
-#define WT_STAT_DSRC_CACHE_EVICTION_FAIL 2044
+#define WT_STAT_DSRC_CACHE_EVICTION_FAIL 2045
/*! cache: eviction walk passes of a file */
-#define WT_STAT_DSRC_CACHE_EVICTION_WALK_PASSES 2045
+#define WT_STAT_DSRC_CACHE_EVICTION_WALK_PASSES 2046
/*! cache: eviction walk target pages histogram - 0-9 */
-#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT10 2046
+#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT10 2047
/*! cache: eviction walk target pages histogram - 10-31 */
-#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT32 2047
+#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT32 2048
/*! cache: eviction walk target pages histogram - 128 and higher */
-#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_GE128 2048
+#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_GE128 2049
/*! cache: eviction walk target pages histogram - 32-63 */
-#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT64 2049
+#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT64 2050
/*! cache: eviction walk target pages histogram - 64-128 */
-#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT128 2050
+#define WT_STAT_DSRC_CACHE_EVICTION_TARGET_PAGE_LT128 2051
/*! cache: eviction walks abandoned */
-#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ABANDONED 2051
+#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ABANDONED 2052
/*! cache: eviction walks gave up because they restarted their walk twice */
-#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_STOPPED 2052
+#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_STOPPED 2053
/*!
* cache: eviction walks gave up because they saw too many pages and
* found no candidates
*/
-#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 2053
+#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_NO_TARGETS 2054
/*!
* cache: eviction walks gave up because they saw too many pages and
* found too few candidates
*/
-#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 2054
+#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_GAVE_UP_RATIO 2055
/*! cache: eviction walks reached end of tree */
-#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ENDED 2055
+#define WT_STAT_DSRC_CACHE_EVICTION_WALKS_ENDED 2056
/*! cache: eviction walks started from root of tree */
-#define WT_STAT_DSRC_CACHE_EVICTION_WALK_FROM_ROOT 2056
+#define WT_STAT_DSRC_CACHE_EVICTION_WALK_FROM_ROOT 2057
/*! cache: eviction walks started from saved location in tree */
-#define WT_STAT_DSRC_CACHE_EVICTION_WALK_SAVED_POS 2057
+#define WT_STAT_DSRC_CACHE_EVICTION_WALK_SAVED_POS 2058
/*! cache: hazard pointer blocked page eviction */
-#define WT_STAT_DSRC_CACHE_EVICTION_HAZARD 2058
+#define WT_STAT_DSRC_CACHE_EVICTION_HAZARD 2059
/*! cache: in-memory page passed criteria to be split */
-#define WT_STAT_DSRC_CACHE_INMEM_SPLITTABLE 2059
+#define WT_STAT_DSRC_CACHE_INMEM_SPLITTABLE 2060
/*! cache: in-memory page splits */
-#define WT_STAT_DSRC_CACHE_INMEM_SPLIT 2060
+#define WT_STAT_DSRC_CACHE_INMEM_SPLIT 2061
/*! cache: internal pages evicted */
-#define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL 2061
+#define WT_STAT_DSRC_CACHE_EVICTION_INTERNAL 2062
/*! cache: internal pages split during eviction */
-#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_INTERNAL 2062
+#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_INTERNAL 2063
/*! cache: leaf pages split during eviction */
-#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_LEAF 2063
+#define WT_STAT_DSRC_CACHE_EVICTION_SPLIT_LEAF 2064
/*! cache: modified pages evicted */
-#define WT_STAT_DSRC_CACHE_EVICTION_DIRTY 2064
+#define WT_STAT_DSRC_CACHE_EVICTION_DIRTY 2065
/*! cache: overflow pages read into cache */
-#define WT_STAT_DSRC_CACHE_READ_OVERFLOW 2065
+#define WT_STAT_DSRC_CACHE_READ_OVERFLOW 2066
/*! cache: page split during eviction deepened the tree */
-#define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN 2066
+#define WT_STAT_DSRC_CACHE_EVICTION_DEEPEN 2067
/*! cache: page written requiring cache overflow records */
-#define WT_STAT_DSRC_CACHE_WRITE_LOOKASIDE 2067
+#define WT_STAT_DSRC_CACHE_WRITE_LOOKASIDE 2068
/*! cache: pages read into cache */
-#define WT_STAT_DSRC_CACHE_READ 2068
+#define WT_STAT_DSRC_CACHE_READ 2069
/*! cache: pages read into cache after truncate */
-#define WT_STAT_DSRC_CACHE_READ_DELETED 2069
+#define WT_STAT_DSRC_CACHE_READ_DELETED 2070
/*! cache: pages read into cache after truncate in prepare state */
-#define WT_STAT_DSRC_CACHE_READ_DELETED_PREPARED 2070
+#define WT_STAT_DSRC_CACHE_READ_DELETED_PREPARED 2071
/*! cache: pages read into cache requiring cache overflow entries */
-#define WT_STAT_DSRC_CACHE_READ_LOOKASIDE 2071
+#define WT_STAT_DSRC_CACHE_READ_LOOKASIDE 2072
/*! cache: pages requested from the cache */
-#define WT_STAT_DSRC_CACHE_PAGES_REQUESTED 2072
+#define WT_STAT_DSRC_CACHE_PAGES_REQUESTED 2073
/*! cache: pages seen by eviction walk */
-#define WT_STAT_DSRC_CACHE_EVICTION_PAGES_SEEN 2073
+#define WT_STAT_DSRC_CACHE_EVICTION_PAGES_SEEN 2074
/*! cache: pages written from cache */
-#define WT_STAT_DSRC_CACHE_WRITE 2074
+#define WT_STAT_DSRC_CACHE_WRITE 2075
/*! cache: pages written requiring in-memory restoration */
-#define WT_STAT_DSRC_CACHE_WRITE_RESTORE 2075
+#define WT_STAT_DSRC_CACHE_WRITE_RESTORE 2076
/*! cache: tracked dirty bytes in the cache */
-#define WT_STAT_DSRC_CACHE_BYTES_DIRTY 2076
+#define WT_STAT_DSRC_CACHE_BYTES_DIRTY 2077
/*! cache: unmodified pages evicted */
-#define WT_STAT_DSRC_CACHE_EVICTION_CLEAN 2077
+#define WT_STAT_DSRC_CACHE_EVICTION_CLEAN 2078
/*!
* cache_walk: Average difference between current eviction generation
* when the page was last considered, only reported if cache_walk or all
* statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_GEN_AVG_GAP 2078
+#define WT_STAT_DSRC_CACHE_STATE_GEN_AVG_GAP 2079
/*!
* cache_walk: Average on-disk page image size seen, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_AVG_WRITTEN_SIZE 2079
+#define WT_STAT_DSRC_CACHE_STATE_AVG_WRITTEN_SIZE 2080
/*!
* cache_walk: Average time in cache for pages that have been visited by
* the eviction server, only reported if cache_walk or all statistics are
* enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_AVG_VISITED_AGE 2080
+#define WT_STAT_DSRC_CACHE_STATE_AVG_VISITED_AGE 2081
/*!
* cache_walk: Average time in cache for pages that have not been visited
* by the eviction server, only reported if cache_walk or all statistics
* are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_AVG_UNVISITED_AGE 2081
+#define WT_STAT_DSRC_CACHE_STATE_AVG_UNVISITED_AGE 2082
/*!
* cache_walk: Clean pages currently in cache, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_PAGES_CLEAN 2082
+#define WT_STAT_DSRC_CACHE_STATE_PAGES_CLEAN 2083
/*!
* cache_walk: Current eviction generation, only reported if cache_walk
* or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_GEN_CURRENT 2083
+#define WT_STAT_DSRC_CACHE_STATE_GEN_CURRENT 2084
/*!
* cache_walk: Dirty pages currently in cache, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_PAGES_DIRTY 2084
+#define WT_STAT_DSRC_CACHE_STATE_PAGES_DIRTY 2085
/*!
* cache_walk: Entries in the root page, only reported if cache_walk or
* all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_ROOT_ENTRIES 2085
+#define WT_STAT_DSRC_CACHE_STATE_ROOT_ENTRIES 2086
/*!
* cache_walk: Internal pages currently in cache, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_PAGES_INTERNAL 2086
+#define WT_STAT_DSRC_CACHE_STATE_PAGES_INTERNAL 2087
/*!
* cache_walk: Leaf pages currently in cache, only reported if cache_walk
* or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_PAGES_LEAF 2087
+#define WT_STAT_DSRC_CACHE_STATE_PAGES_LEAF 2088
/*!
* cache_walk: Maximum difference between current eviction generation
* when the page was last considered, only reported if cache_walk or all
* statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_GEN_MAX_GAP 2088
+#define WT_STAT_DSRC_CACHE_STATE_GEN_MAX_GAP 2089
/*!
* cache_walk: Maximum page size seen, only reported if cache_walk or all
* statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_MAX_PAGESIZE 2089
+#define WT_STAT_DSRC_CACHE_STATE_MAX_PAGESIZE 2090
/*!
* cache_walk: Minimum on-disk page image size seen, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_MIN_WRITTEN_SIZE 2090
+#define WT_STAT_DSRC_CACHE_STATE_MIN_WRITTEN_SIZE 2091
/*!
* cache_walk: Number of pages never visited by eviction server, only
* reported if cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_UNVISITED_COUNT 2091
+#define WT_STAT_DSRC_CACHE_STATE_UNVISITED_COUNT 2092
/*!
* cache_walk: On-disk page image sizes smaller than a single allocation
* unit, only reported if cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_SMALLER_ALLOC_SIZE 2092
+#define WT_STAT_DSRC_CACHE_STATE_SMALLER_ALLOC_SIZE 2093
/*!
* cache_walk: Pages created in memory and never written, only reported
* if cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_MEMORY 2093
+#define WT_STAT_DSRC_CACHE_STATE_MEMORY 2094
/*!
* cache_walk: Pages currently queued for eviction, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_QUEUED 2094
+#define WT_STAT_DSRC_CACHE_STATE_QUEUED 2095
/*!
* cache_walk: Pages that could not be queued for eviction, only reported
* if cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_NOT_QUEUEABLE 2095
+#define WT_STAT_DSRC_CACHE_STATE_NOT_QUEUEABLE 2096
/*!
* cache_walk: Refs skipped during cache traversal, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_REFS_SKIPPED 2096
+#define WT_STAT_DSRC_CACHE_STATE_REFS_SKIPPED 2097
/*!
* cache_walk: Size of the root page, only reported if cache_walk or all
* statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_ROOT_SIZE 2097
+#define WT_STAT_DSRC_CACHE_STATE_ROOT_SIZE 2098
/*!
* cache_walk: Total number of pages currently in cache, only reported if
* cache_walk or all statistics are enabled
*/
-#define WT_STAT_DSRC_CACHE_STATE_PAGES 2098
+#define WT_STAT_DSRC_CACHE_STATE_PAGES 2099
/*! compression: compressed pages read */
-#define WT_STAT_DSRC_COMPRESS_READ 2099
+#define WT_STAT_DSRC_COMPRESS_READ 2100
/*! compression: compressed pages written */
-#define WT_STAT_DSRC_COMPRESS_WRITE 2100
+#define WT_STAT_DSRC_COMPRESS_WRITE 2101
/*! compression: page written failed to compress */
-#define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2101
+#define WT_STAT_DSRC_COMPRESS_WRITE_FAIL 2102
/*! compression: page written was too small to compress */
-#define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2102
+#define WT_STAT_DSRC_COMPRESS_WRITE_TOO_SMALL 2103
/*! compression: raw compression call failed, additional data available */
-#define WT_STAT_DSRC_COMPRESS_RAW_FAIL_TEMPORARY 2103
+#define WT_STAT_DSRC_COMPRESS_RAW_FAIL_TEMPORARY 2104
/*! compression: raw compression call failed, no additional data available */
-#define WT_STAT_DSRC_COMPRESS_RAW_FAIL 2104
+#define WT_STAT_DSRC_COMPRESS_RAW_FAIL 2105
/*! compression: raw compression call succeeded */
-#define WT_STAT_DSRC_COMPRESS_RAW_OK 2105
+#define WT_STAT_DSRC_COMPRESS_RAW_OK 2106
/*! cursor: bulk-loaded cursor-insert calls */
-#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2106
+#define WT_STAT_DSRC_CURSOR_INSERT_BULK 2107
/*! cursor: close calls that result in cache */
-#define WT_STAT_DSRC_CURSOR_CACHE 2107
+#define WT_STAT_DSRC_CURSOR_CACHE 2108
/*! cursor: create calls */
-#define WT_STAT_DSRC_CURSOR_CREATE 2108
+#define WT_STAT_DSRC_CURSOR_CREATE 2109
/*! cursor: cursor operation restarted */
-#define WT_STAT_DSRC_CURSOR_RESTART 2109
+#define WT_STAT_DSRC_CURSOR_RESTART 2110
/*! cursor: cursor-insert key and value bytes inserted */
-#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2110
+#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2111
/*! cursor: cursor-remove key bytes removed */
-#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2111
+#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2112
/*! cursor: cursor-update value bytes updated */
-#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2112
+#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2113
/*! cursor: cursors reused from cache */
-#define WT_STAT_DSRC_CURSOR_REOPEN 2113
+#define WT_STAT_DSRC_CURSOR_REOPEN 2114
/*! cursor: insert calls */
-#define WT_STAT_DSRC_CURSOR_INSERT 2114
+#define WT_STAT_DSRC_CURSOR_INSERT 2115
/*! cursor: modify calls */
-#define WT_STAT_DSRC_CURSOR_MODIFY 2115
+#define WT_STAT_DSRC_CURSOR_MODIFY 2116
/*! cursor: next calls */
-#define WT_STAT_DSRC_CURSOR_NEXT 2116
+#define WT_STAT_DSRC_CURSOR_NEXT 2117
/*! cursor: prev calls */
-#define WT_STAT_DSRC_CURSOR_PREV 2117
+#define WT_STAT_DSRC_CURSOR_PREV 2118
/*! cursor: remove calls */
-#define WT_STAT_DSRC_CURSOR_REMOVE 2118
+#define WT_STAT_DSRC_CURSOR_REMOVE 2119
/*! cursor: reserve calls */
-#define WT_STAT_DSRC_CURSOR_RESERVE 2119
+#define WT_STAT_DSRC_CURSOR_RESERVE 2120
/*! cursor: reset calls */
-#define WT_STAT_DSRC_CURSOR_RESET 2120
+#define WT_STAT_DSRC_CURSOR_RESET 2121
/*! cursor: search calls */
-#define WT_STAT_DSRC_CURSOR_SEARCH 2121
+#define WT_STAT_DSRC_CURSOR_SEARCH 2122
/*! cursor: search near calls */
-#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2122
+#define WT_STAT_DSRC_CURSOR_SEARCH_NEAR 2123
/*! cursor: truncate calls */
-#define WT_STAT_DSRC_CURSOR_TRUNCATE 2123
+#define WT_STAT_DSRC_CURSOR_TRUNCATE 2124
/*! cursor: update calls */
-#define WT_STAT_DSRC_CURSOR_UPDATE 2124
+#define WT_STAT_DSRC_CURSOR_UPDATE 2125
/*! reconciliation: dictionary matches */
-#define WT_STAT_DSRC_REC_DICTIONARY 2125
+#define WT_STAT_DSRC_REC_DICTIONARY 2126
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2126
+#define WT_STAT_DSRC_REC_PAGE_DELETE_FAST 2127
/*!
* reconciliation: internal page key bytes discarded using suffix
* compression
*/
-#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2127
+#define WT_STAT_DSRC_REC_SUFFIX_COMPRESSION 2128
/*! reconciliation: internal page multi-block writes */
-#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2128
+#define WT_STAT_DSRC_REC_MULTIBLOCK_INTERNAL 2129
/*! reconciliation: internal-page overflow keys */
-#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2129
+#define WT_STAT_DSRC_REC_OVERFLOW_KEY_INTERNAL 2130
/*! reconciliation: leaf page key bytes discarded using prefix compression */
-#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2130
+#define WT_STAT_DSRC_REC_PREFIX_COMPRESSION 2131
/*! reconciliation: leaf page multi-block writes */
-#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2131
+#define WT_STAT_DSRC_REC_MULTIBLOCK_LEAF 2132
/*! reconciliation: leaf-page overflow keys */
-#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2132
+#define WT_STAT_DSRC_REC_OVERFLOW_KEY_LEAF 2133
/*! reconciliation: maximum blocks required for a page */
-#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2133
+#define WT_STAT_DSRC_REC_MULTIBLOCK_MAX 2134
/*! reconciliation: overflow values written */
-#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2134
+#define WT_STAT_DSRC_REC_OVERFLOW_VALUE 2135
/*! reconciliation: page checksum matches */
-#define WT_STAT_DSRC_REC_PAGE_MATCH 2135
+#define WT_STAT_DSRC_REC_PAGE_MATCH 2136
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_DSRC_REC_PAGES 2136
+#define WT_STAT_DSRC_REC_PAGES 2137
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_DSRC_REC_PAGES_EVICTION 2137
+#define WT_STAT_DSRC_REC_PAGES_EVICTION 2138
/*! reconciliation: pages deleted */
-#define WT_STAT_DSRC_REC_PAGE_DELETE 2138
+#define WT_STAT_DSRC_REC_PAGE_DELETE 2139
/*! session: cached cursor count */
-#define WT_STAT_DSRC_SESSION_CURSORS_CACHED 2139
+#define WT_STAT_DSRC_SESSION_CURSORS_CACHED 2140
/*! session: object compaction */
-#define WT_STAT_DSRC_SESSION_COMPACT 2140
+#define WT_STAT_DSRC_SESSION_COMPACT 2141
/*! session: open cursor count */
-#define WT_STAT_DSRC_SESSION_CURSOR_OPEN 2141
+#define WT_STAT_DSRC_SESSION_CURSOR_OPEN 2142
/*! transaction: update conflicts */
-#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2142
+#define WT_STAT_DSRC_TXN_UPDATE_CONFLICT 2143
/*!
* @}
@@ -6193,6 +6195,27 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_JOIN_BLOOM_INSERT 3003
/*! : items iterated */
#define WT_STAT_JOIN_ITERATED 3004
+
+/*!
+ * @}
+ * @name Statistics for session
+ * @anchor statistics_session
+ * @{
+ */
+/*! session: bytes read into cache */
+#define WT_STAT_SESSION_BYTES_READ 4000
+/*! session: bytes written from cache */
+#define WT_STAT_SESSION_BYTES_WRITE 4001
+/*! session: dhandle lock wait time (usecs) */
+#define WT_STAT_SESSION_LOCK_DHANDLE_WAIT 4002
+/*! session: page read from disk to cache time (usecs) */
+#define WT_STAT_SESSION_READ_TIME 4003
+/*! session: page write from cache to disk time (usecs) */
+#define WT_STAT_SESSION_WRITE_TIME 4004
+/*! session: schema lock wait time (usecs) */
+#define WT_STAT_SESSION_LOCK_SCHEMA_WAIT 4005
+/*! session: time waiting for cache (usecs) */
+#define WT_STAT_SESSION_CACHE_TIME 4006
/*! @} */
/*
* Statistics section: END
diff --git a/src/third_party/wiredtiger/src/include/wt_internal.h b/src/third_party/wiredtiger/src/include/wt_internal.h
index 10ca7330885..bea08bb27cc 100644
--- a/src/third_party/wiredtiger/src/include/wt_internal.h
+++ b/src/third_party/wiredtiger/src/include/wt_internal.h
@@ -287,6 +287,8 @@ struct __wt_session_impl;
typedef struct __wt_session_impl WT_SESSION_IMPL;
struct __wt_session_stash;
typedef struct __wt_session_stash WT_SESSION_STASH;
+struct __wt_session_stats;
+ typedef struct __wt_session_stats WT_SESSION_STATS;
struct __wt_size;
typedef struct __wt_size WT_SIZE;
struct __wt_spinlock;
@@ -299,8 +301,6 @@ struct __wt_thread;
typedef struct __wt_thread WT_THREAD;
struct __wt_thread_group;
typedef struct __wt_thread_group WT_THREAD_GROUP;
-struct __wt_timestamp_t;
- typedef struct __wt_timestamp_t WT_TIMESTAMP_T;
struct __wt_txn;
typedef struct __wt_txn WT_TXN;
struct __wt_txn_global;
@@ -317,6 +317,9 @@ union __wt_lsn;
typedef union __wt_lsn WT_LSN;
union __wt_rand_state;
typedef union __wt_rand_state WT_RAND_STATE;
+
+typedef uint64_t wt_timestamp_t;
+
/*
* Forward type declarations for internal types: END
* DO NOT EDIT: automatically built by dist/s_typedef.
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_cursor.c b/src/third_party/wiredtiger/src/lsm/lsm_cursor.c
index 5dd3122d41c..0a0bf373341 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_cursor.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_cursor.c
@@ -240,7 +240,7 @@ __clsm_enter(WT_CURSOR_LSM *clsm, bool reset, bool update)
break;
WT_ASSERT(session,
!__wt_txn_visible_all(
- session, switch_txn, NULL));
+ session, switch_txn, WT_TS_NONE));
}
}
}
@@ -1500,7 +1500,7 @@ __clsm_put(WT_SESSION_IMPL *session, WT_CURSOR_LSM *clsm,
for (i = 0, slot = clsm->nchunks - 1; i < clsm->nupdates; i++, slot--) {
/* Check if we need to keep updating old chunks. */
if (i > 0 && __wt_txn_visible(
- session, clsm->chunks[slot]->switch_txn, NULL)) {
+ session, clsm->chunks[slot]->switch_txn, WT_TS_NONE)) {
clsm->nupdates = i;
break;
}
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_work_unit.c b/src/third_party/wiredtiger/src/lsm/lsm_work_unit.c
index a283670eba6..98645456fc4 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_work_unit.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_work_unit.c
@@ -264,20 +264,18 @@ bool
__wt_lsm_chunk_visible_all(
WT_SESSION_IMPL *session, WT_LSM_CHUNK *chunk)
{
+ WT_TXN_GLOBAL *txn_global;
+
+ txn_global = &S2C(session)->txn_global;
+
/* Once a chunk has been flushed it's contents must be visible */
if (F_ISSET(chunk, WT_LSM_CHUNK_ONDISK | WT_LSM_CHUNK_STABLE))
return (true);
if (chunk->switch_txn == WT_TXN_NONE ||
- !__wt_txn_visible_all(session, chunk->switch_txn, NULL))
+ !__wt_txn_visible_all(session, chunk->switch_txn, WT_TS_NONE))
return (false);
-#ifdef HAVE_TIMESTAMPS
- {
- WT_TXN_GLOBAL *txn_global;
-
- txn_global = &S2C(session)->txn_global;
-
/*
* Once all transactions with updates in the chunk are visible all
* timestamps associated with those updates are assigned so setup a
@@ -290,15 +288,15 @@ __wt_lsm_chunk_visible_all(
/* Set the timestamp if we won the race */
if (!F_ISSET(chunk, WT_LSM_CHUNK_HAS_TIMESTAMP)) {
__wt_readlock(session, &txn_global->rwlock);
- __wt_timestamp_set(&chunk->switch_timestamp,
- &txn_global->commit_timestamp);
+ chunk->switch_timestamp =
+ txn_global->commit_timestamp;
__wt_readunlock(session, &txn_global->rwlock);
F_SET(chunk, WT_LSM_CHUNK_HAS_TIMESTAMP);
}
__wt_spin_unlock(session, &chunk->timestamp_spinlock);
}
if (!__wt_txn_visible_all(
- session, chunk->switch_txn, &chunk->switch_timestamp))
+ session, chunk->switch_txn, chunk->switch_timestamp))
return (false);
} else
/*
@@ -307,8 +305,7 @@ __wt_lsm_chunk_visible_all(
* there could be confusion if timestamps start being used.
*/
F_SET(chunk, WT_LSM_CHUNK_HAS_TIMESTAMP);
- }
-#endif
+
return (true);
}
diff --git a/src/third_party/wiredtiger/src/meta/meta_ckpt.c b/src/third_party/wiredtiger/src/meta/meta_ckpt.c
index 13e84efc199..2703ff018b6 100644
--- a/src/third_party/wiredtiger/src/meta/meta_ckpt.c
+++ b/src/third_party/wiredtiger/src/meta/meta_ckpt.c
@@ -502,20 +502,19 @@ __wt_meta_sysinfo_set(WT_SESSION_IMPL *session)
{
WT_DECL_ITEM(buf);
WT_DECL_RET;
- char hex_timestamp[2 * WT_TIMESTAMP_SIZE + 2];
+ char hex_timestamp[2 * sizeof(wt_timestamp_t) + 2];
WT_ERR(__wt_scr_alloc(session, 0, &buf));
hex_timestamp[0] = '0';
hex_timestamp[1] = '\0';
-#ifdef HAVE_TIMESTAMPS
+
/*
* We need to record the timestamp of the checkpoint in the metadata.
* The timestamp value is set at a higher level, either in checkpoint
* or in recovery.
*/
- WT_ERR(__wt_timestamp_to_hex_string(session, hex_timestamp,
- &S2C(session)->txn_global.meta_ckpt_timestamp));
-#endif
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, S2C(session)->txn_global.meta_ckpt_timestamp);
/*
* Don't leave a zero entry in the metadata: remove it. This avoids
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c
index eb0c166c44c..d3caa23ed02 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_write.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c
@@ -47,11 +47,11 @@ typedef struct {
/* Track the page's min/maximum transactions. */
uint64_t max_txn;
- WT_DECL_TIMESTAMP(max_timestamp)
+ wt_timestamp_t max_timestamp;
/* Lookaside boundary tracking. */
uint64_t unstable_txn;
- WT_DECL_TIMESTAMP(unstable_timestamp)
+ wt_timestamp_t unstable_timestamp;
u_int updates_seen; /* Count of updates seen. */
u_int updates_unstable; /* Count of updates not visible_all. */
@@ -440,11 +440,9 @@ __wt_reconcile(WT_SESSION_IMPL *session, WT_REF *ref,
*/
if (LF_ISSET(WT_REC_EVICT)) {
mod->last_eviction_id = oldest_id;
-#ifdef HAVE_TIMESTAMPS
if (S2C(session)->txn_global.has_pinned_timestamp)
__wt_txn_pinned_timestamp(
session, &mod->last_eviction_timestamp);
-#endif
mod->last_evict_pass_gen = S2C(session)->cache->evict_pass_gen;
}
@@ -503,16 +501,12 @@ __wt_reconcile(WT_SESSION_IMPL *session, WT_REF *ref,
else
WT_TRET(__rec_write_wrapup_err(session, r, page));
-#ifdef HAVE_TIMESTAMPS
/*
* If reconciliation completes successfully, save the stable timestamp.
*/
if (ret == 0 && S2C(session)->txn_global.has_stable_timestamp)
- WT_WITH_TIMESTAMP_READLOCK(session,
- &S2C(session)->txn_global.rwlock,
- __wt_timestamp_set(&mod->last_stable_timestamp,
- &S2C(session)->txn_global.stable_timestamp));
-#endif
+ mod->last_stable_timestamp =
+ S2C(session)->txn_global.stable_timestamp;
/* Release the reconciliation lock. */
WT_PAGE_UNLOCK(session, page);
@@ -701,7 +695,7 @@ __rec_write_page_status(WT_SESSION_IMPL *session, WT_RECONCILE *r)
* we can evict a clean page and discard its history).
*/
mod->rec_max_txn = r->max_txn;
- __wt_timestamp_set(&mod->rec_max_timestamp, &r->max_timestamp);
+ mod->rec_max_timestamp = r->max_timestamp;
/*
* Track the tree's maximum transaction ID (used to decide if
@@ -714,12 +708,8 @@ __rec_write_page_status(WT_SESSION_IMPL *session, WT_RECONCILE *r)
if (!F_ISSET(r, WT_REC_EVICT)) {
if (WT_TXNID_LT(btree->rec_max_txn, r->max_txn))
btree->rec_max_txn = r->max_txn;
-#ifdef HAVE_TIMESTAMPS
- if (__wt_timestamp_cmp(
- &btree->rec_max_timestamp, &r->max_timestamp) < 0)
- __wt_timestamp_set(&btree->rec_max_timestamp,
- &r->max_timestamp);
-#endif
+ if (btree->rec_max_timestamp < r->max_timestamp)
+ btree->rec_max_timestamp = r->max_timestamp;
}
/*
@@ -951,17 +941,15 @@ __rec_init(WT_SESSION_IMPL *session,
*/
r->las_skew_newest =
LF_ISSET(WT_REC_LOOKASIDE) && LF_ISSET(WT_REC_VISIBLE_ALL);
-#ifdef HAVE_TIMESTAMPS
if (r->las_skew_newest &&
!__wt_btree_immediately_durable(session) &&
txn_global->has_stable_timestamp &&
((btree->checkpoint_gen != __wt_gen(session, WT_GEN_CHECKPOINT) &&
txn_global->stable_is_pinned) ||
FLD_ISSET(page->modify->restore_state, WT_PAGE_RS_LOOKASIDE) ||
- __wt_timestamp_cmp(&page->modify->last_stable_timestamp,
- &txn_global->stable_timestamp) == 0))
+ page->modify->last_stable_timestamp ==
+ txn_global->stable_timestamp))
r->las_skew_newest = false;
-#endif
/*
* When operating on the lookaside table, we should never try
@@ -992,7 +980,7 @@ __rec_init(WT_SESSION_IMPL *session,
/* Track the page's min/maximum transaction */
r->max_txn = WT_TXN_NONE;
- __wt_timestamp_set_zero(&r->max_timestamp);
+ r->max_timestamp = 0;
/*
* Track the first unstable transaction (when skewing newest this is
@@ -1002,10 +990,10 @@ __rec_init(WT_SESSION_IMPL *session,
*/
if (r->las_skew_newest) {
r->unstable_txn = WT_TXN_NONE;
- __wt_timestamp_set_zero(&r->unstable_timestamp);
+ r->unstable_timestamp = 0;
} else {
r->unstable_txn = WT_TXN_ABORTED;
- __wt_timestamp_set_inf(&r->unstable_timestamp);
+ r->unstable_timestamp = UINT64_MAX;
}
/* Track if updates were used and/or uncommitted. */
@@ -1257,7 +1245,7 @@ __rec_append_orig_value(WT_SESSION_IMPL *session,
*/
if (upd->type == WT_UPDATE_BIRTHMARK) {
append->txnid = upd->txnid;
- __wt_timestamp_set(&append->timestamp, &upd->timestamp);
+ append->timestamp = upd->timestamp;
append->next = upd->next;
}
@@ -1285,23 +1273,18 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
bool *upd_savedp, WT_UPDATE **updp)
{
WT_PAGE *page;
- WT_UPDATE *first_txn_upd, *first_upd, *upd;
- wt_timestamp_t *timestampp;
+ WT_UPDATE *first_ts_upd, *first_txn_upd, *first_upd, *upd;
+ wt_timestamp_t timestamp;
size_t upd_memsize;
uint64_t max_txn, txnid;
bool all_visible, prepared, skipped_birthmark, uncommitted;
-#ifdef HAVE_TIMESTAMPS
- WT_UPDATE *first_ts_upd;
- first_ts_upd = NULL;
-#endif
-
if (upd_savedp != NULL)
*upd_savedp = false;
*updp = NULL;
page = r->page;
- first_txn_upd = NULL;
+ first_ts_upd = first_txn_upd = NULL;
upd_memsize = 0;
max_txn = WT_TXN_NONE;
prepared = skipped_birthmark = uncommitted = false;
@@ -1356,12 +1339,9 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
continue;
}
-#ifdef HAVE_TIMESTAMPS
/* Track the first update with non-zero timestamp. */
- if (first_ts_upd == NULL &&
- !__wt_timestamp_iszero(&upd->timestamp))
+ if (first_ts_upd == NULL && upd->timestamp != 0)
first_ts_upd = upd;
-#endif
/*
* Find the first update we can use.
@@ -1454,12 +1434,9 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
if (WT_TXNID_LT(r->max_txn, max_txn))
r->max_txn = max_txn;
-#ifdef HAVE_TIMESTAMPS
/* Update the maximum timestamp. */
- if (first_ts_upd != NULL &&
- __wt_timestamp_cmp(&r->max_timestamp, &first_ts_upd->timestamp) < 0)
- __wt_timestamp_set(&r->max_timestamp, &first_ts_upd->timestamp);
-#endif
+ if (first_ts_upd != NULL && r->max_timestamp < first_ts_upd->timestamp)
+ r->max_timestamp = first_ts_upd->timestamp;
/*
* If the update we chose was a birthmark, or we are doing
@@ -1479,15 +1456,11 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
* order), so we track the maximum transaction ID and the newest update
* with a timestamp (if any).
*/
-#ifdef HAVE_TIMESTAMPS
- timestampp = first_ts_upd == NULL ? NULL : &first_ts_upd->timestamp;
-#else
- timestampp = NULL;
-#endif
+ timestamp = first_ts_upd == NULL ? 0 : first_ts_upd->timestamp;
all_visible = upd == first_txn_upd && !(uncommitted || prepared) &&
(F_ISSET(r, WT_REC_VISIBLE_ALL) ?
- __wt_txn_visible_all(session, max_txn, timestampp) :
- __wt_txn_visible(session, max_txn, timestampp));
+ __wt_txn_visible_all(session, max_txn, timestamp) :
+ __wt_txn_visible(session, max_txn, timestamp));
if (all_visible)
goto check_original_value;
@@ -1544,13 +1517,9 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
if (F_ISSET(r, WT_REC_LOOKASIDE) && r->las_skew_newest) {
if (WT_TXNID_LT(r->unstable_txn, first_upd->txnid))
r->unstable_txn = first_upd->txnid;
-#ifdef HAVE_TIMESTAMPS
if (first_ts_upd != NULL &&
- __wt_timestamp_cmp(&r->unstable_timestamp,
- &first_ts_upd->timestamp) < 0)
- __wt_timestamp_set(&r->unstable_timestamp,
- &first_ts_upd->timestamp);
-#endif
+ r->unstable_timestamp < first_ts_upd->timestamp)
+ r->unstable_timestamp = first_ts_upd->timestamp;
} else if (F_ISSET(r, WT_REC_LOOKASIDE)) {
for (upd = first_upd; upd != *updp; upd = upd->next) {
if (upd->txnid == WT_TXN_ABORTED)
@@ -1559,12 +1528,8 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
if (upd->txnid != WT_TXN_NONE &&
WT_TXNID_LT(upd->txnid, r->unstable_txn))
r->unstable_txn = upd->txnid;
-#ifdef HAVE_TIMESTAMPS
- if (__wt_timestamp_cmp(&upd->timestamp,
- &r->unstable_timestamp) < 0)
- __wt_timestamp_set(&r->unstable_timestamp,
- &upd->timestamp);
-#endif
+ if (upd->timestamp < r->unstable_timestamp)
+ r->unstable_timestamp = upd->timestamp;
}
}
@@ -3434,12 +3399,8 @@ done: if (F_ISSET(r, WT_REC_LOOKASIDE)) {
multi->page_las.max_txn = r->max_txn;
multi->page_las.unstable_txn = r->unstable_txn;
WT_ASSERT(session, r->unstable_txn != WT_TXN_NONE);
-#ifdef HAVE_TIMESTAMPS
- __wt_timestamp_set(&multi->page_las.max_timestamp,
- &r->max_timestamp);
- __wt_timestamp_set(&multi->page_las.unstable_timestamp,
- &r->unstable_timestamp);
-#endif
+ multi->page_las.max_timestamp = r->max_timestamp;
+ multi->page_las.unstable_timestamp = r->unstable_timestamp;
}
err: __wt_scr_free(session, &key);
diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c
index 857003c7abe..c413fb21f32 100644
--- a/src/third_party/wiredtiger/src/session/session_api.c
+++ b/src/third_party/wiredtiger/src/session/session_api.c
@@ -1012,6 +1012,10 @@ __session_reset(WT_SESSION *wt_session)
/* Release common session resources. */
WT_TRET(__wt_session_release_resources(session));
+ /* Reset the session statistics. */
+ if (WT_STAT_ENABLED(session))
+ __wt_stat_session_clear_single(&session->stats);
+
err: API_END_RET_NOTFOUND_MAP(session, ret);
}
@@ -2231,6 +2235,8 @@ __open_session(WT_CONNECTION_IMPL *conn,
session_ret->optrackbuf_ptr = 0;
}
+ __wt_stat_session_init_single(&session_ret->stats);
+
/* Set the default value for session flags. */
if (F_ISSET(conn, WT_CONN_CACHE_CURSORS))
F_SET(session_ret, WT_SESSION_CACHE_CURSORS);
diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c
index 90891c2b28f..a2019cd3aac 100644
--- a/src/third_party/wiredtiger/src/support/stat.c
+++ b/src/third_party/wiredtiger/src/support/stat.c
@@ -44,6 +44,7 @@ static const char * const __stats_dsrc_desc[] = {
"btree: row-store internal pages",
"btree: row-store leaf pages",
"cache: bytes currently in the cache",
+ "cache: bytes dirty in the cache cumulative",
"cache: bytes read into cache",
"cache: bytes written from cache",
"cache: checkpoint blocked page eviction",
@@ -229,6 +230,7 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats)
stats->btree_row_internal = 0;
stats->btree_row_leaf = 0;
/* not clearing cache_bytes_inuse */
+ /* not clearing cache_bytes_dirty_total */
stats->cache_bytes_read = 0;
stats->cache_bytes_write = 0;
stats->cache_eviction_checkpoint = 0;
@@ -399,6 +401,7 @@ __wt_stat_dsrc_aggregate_single(
to->btree_row_internal += from->btree_row_internal;
to->btree_row_leaf += from->btree_row_leaf;
to->cache_bytes_inuse += from->cache_bytes_inuse;
+ to->cache_bytes_dirty_total += from->cache_bytes_dirty_total;
to->cache_bytes_read += from->cache_bytes_read;
to->cache_bytes_write += from->cache_bytes_write;
to->cache_eviction_checkpoint += from->cache_eviction_checkpoint;
@@ -590,6 +593,8 @@ __wt_stat_dsrc_aggregate(
to->btree_row_internal += WT_STAT_READ(from, btree_row_internal);
to->btree_row_leaf += WT_STAT_READ(from, btree_row_leaf);
to->cache_bytes_inuse += WT_STAT_READ(from, cache_bytes_inuse);
+ to->cache_bytes_dirty_total +=
+ WT_STAT_READ(from, cache_bytes_dirty_total);
to->cache_bytes_read += WT_STAT_READ(from, cache_bytes_read);
to->cache_bytes_write += WT_STAT_READ(from, cache_bytes_write);
to->cache_eviction_checkpoint +=
@@ -785,6 +790,7 @@ static const char * const __stats_connection_desc[] = {
"cache: bytes belonging to page images in the cache",
"cache: bytes belonging to the cache overflow table in the cache",
"cache: bytes currently in the cache",
+ "cache: bytes dirty in the cache cumulative",
"cache: bytes not belonging to page images in the cache",
"cache: bytes read into cache",
"cache: bytes written from cache",
@@ -1193,6 +1199,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
/* not clearing cache_bytes_image */
/* not clearing cache_bytes_lookaside */
/* not clearing cache_bytes_inuse */
+ /* not clearing cache_bytes_dirty_total */
/* not clearing cache_bytes_other */
stats->cache_bytes_read = 0;
stats->cache_bytes_write = 0;
@@ -1584,6 +1591,8 @@ __wt_stat_connection_aggregate(
to->cache_bytes_lookaside +=
WT_STAT_READ(from, cache_bytes_lookaside);
to->cache_bytes_inuse += WT_STAT_READ(from, cache_bytes_inuse);
+ to->cache_bytes_dirty_total +=
+ WT_STAT_READ(from, cache_bytes_dirty_total);
to->cache_bytes_other += WT_STAT_READ(from, cache_bytes_other);
to->cache_bytes_read += WT_STAT_READ(from, cache_bytes_read);
to->cache_bytes_write += WT_STAT_READ(from, cache_bytes_write);
@@ -2147,3 +2156,39 @@ __wt_stat_join_aggregate(
to->bloom_insert += WT_STAT_READ(from, bloom_insert);
to->iterated += WT_STAT_READ(from, iterated);
}
+
+static const char * const __stats_session_desc[] = {
+ "session: bytes read into cache",
+ "session: bytes written from cache",
+ "session: dhandle lock wait time (usecs)",
+ "session: page read from disk to cache time (usecs)",
+ "session: page write from cache to disk time (usecs)",
+ "session: schema lock wait time (usecs)",
+ "session: time waiting for cache (usecs)",
+};
+
+int
+__wt_stat_session_desc(WT_CURSOR_STAT *cst, int slot, const char **p)
+{
+ WT_UNUSED(cst);
+ *p = __stats_session_desc[slot];
+ return (0);
+}
+
+void
+__wt_stat_session_init_single(WT_SESSION_STATS *stats)
+{
+ memset(stats, 0, sizeof(*stats));
+}
+
+void
+__wt_stat_session_clear_single(WT_SESSION_STATS *stats)
+{
+ stats->bytes_read = 0;
+ stats->bytes_write = 0;
+ stats->lock_dhandle_wait = 0;
+ stats->read_time = 0;
+ stats->write_time = 0;
+ stats->lock_schema_wait = 0;
+ stats->cache_time = 0;
+}
diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c
index 6f8c0969f40..20e469d0262 100644
--- a/src/third_party/wiredtiger/src/txn/txn.c
+++ b/src/third_party/wiredtiger/src/txn/txn.c
@@ -129,7 +129,7 @@ __wt_txn_release_snapshot(WT_SESSION_IMPL *session)
WT_ASSERT(session,
txn_state->pinned_id == WT_TXN_NONE ||
session->txn.isolation == WT_ISO_READ_UNCOMMITTED ||
- !__wt_txn_visible_all(session, txn_state->pinned_id, NULL));
+ !__wt_txn_visible_all(session, txn_state->pinned_id, WT_TS_NONE));
txn_state->metadata_pinned = txn_state->pinned_id = WT_TXN_NONE;
F_CLR(txn, WT_TXN_HAS_SNAPSHOT);
@@ -137,7 +137,7 @@ __wt_txn_release_snapshot(WT_SESSION_IMPL *session)
/* Clear a checkpoint's pinned ID. */
if (WT_SESSION_IS_CHECKPOINT(session)) {
txn_global->checkpoint_state.pinned_id = WT_TXN_NONE;
- __wt_timestamp_set_zero(&txn_global->checkpoint_timestamp);
+ txn_global->checkpoint_timestamp = 0;
}
__wt_txn_clear_read_timestamp(session);
@@ -329,11 +329,9 @@ __wt_txn_update_oldest(WT_SESSION_IMPL *session, uint32_t flags)
prev_metadata_pinned = txn_global->metadata_pinned;
prev_oldest_id = txn_global->oldest_id;
-#ifdef HAVE_TIMESTAMPS
/* Try to move the pinned timestamp forward. */
if (strict)
WT_RET(__wt_txn_update_pinned_timestamp(session, false));
-#endif
/*
* For pure read-only workloads, or if the update isn't forced and the
@@ -577,7 +575,6 @@ __wt_txn_release(WT_SESSION_IMPL *session)
txn->flags = 0;
}
-#ifdef HAVE_TIMESTAMPS
/*
* __txn_commit_timestamp_validate --
* Validate that timestamp provided to commit is legal.
@@ -585,10 +582,10 @@ __wt_txn_release(WT_SESSION_IMPL *session)
static inline int
__txn_commit_timestamp_validate(WT_SESSION_IMPL *session)
{
- WT_DECL_TIMESTAMP(op_timestamp)
WT_TXN *txn;
WT_TXN_OP *op;
WT_UPDATE *upd;
+ wt_timestamp_t op_timestamp;
u_int i;
bool op_zero_ts, upd_zero_ts;
@@ -646,7 +643,7 @@ __txn_commit_timestamp_validate(WT_SESSION_IMPL *session)
* Check timestamps are used in order.
*/
op_zero_ts = !F_ISSET(txn, WT_TXN_HAS_TS_COMMIT);
- upd_zero_ts = __wt_timestamp_iszero(&upd->timestamp);
+ upd_zero_ts = upd->timestamp == 0;
if (op_zero_ts != upd_zero_ts)
WT_RET_MSG(session, EINVAL,
"per-key timestamps used inconsistently");
@@ -663,16 +660,14 @@ __txn_commit_timestamp_validate(WT_SESSION_IMPL *session)
* Only if the update structure doesn't have a timestamp
* then use the one in the transaction structure.
*/
- if (__wt_timestamp_iszero(&op_timestamp))
+ if (op_timestamp == 0)
op_timestamp = txn->commit_timestamp;
- if (__wt_timestamp_cmp(&op_timestamp,
- &upd->timestamp) < 0)
+ if (op_timestamp < upd->timestamp)
WT_RET_MSG(session, EINVAL,
"out of order timestamps");
}
return (0);
}
-#endif
/*
* __wt_txn_commit --
@@ -688,17 +683,15 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
WT_TXN_GLOBAL *txn_global;
WT_TXN_OP *op;
WT_UPDATE *upd;
+ wt_timestamp_t prev_commit_timestamp, ts;
uint32_t fileid;
u_int i;
- bool locked, prepare, readonly;
-#ifdef HAVE_TIMESTAMPS
- wt_timestamp_t prev_commit_timestamp, ts;
- bool update_timestamp;
-#endif
+ bool locked, prepare, readonly, update_timestamp;
txn = &session->txn;
conn = S2C(session);
txn_global = &conn->txn_global;
+ prev_commit_timestamp = 0; /* -Wconditional-uninitialized */
locked = false;
WT_ASSERT(session, F_ISSET(txn, WT_TXN_RUNNING));
@@ -712,15 +705,10 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
WT_ERR(
__wt_config_gets_def(session, cfg, "commit_timestamp", 0, &cval));
if (cval.len != 0) {
-#ifdef HAVE_TIMESTAMPS
WT_ERR(__wt_txn_parse_timestamp(session, "commit", &ts, &cval));
- WT_ERR(__wt_timestamp_validate(session, "commit", &ts, &cval));
- __wt_timestamp_set(&txn->commit_timestamp, &ts);
+ WT_ERR(__wt_timestamp_validate(session, "commit", ts, &cval));
+ txn->commit_timestamp = ts;
__wt_txn_set_commit_timestamp(session);
-#else
- WT_ERR_MSG(session, EINVAL, "commit_timestamp requires a "
- "version of WiredTiger built with timestamp support");
-#endif
}
prepare = F_ISSET(txn, WT_TXN_PREPARE);
@@ -728,9 +716,7 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
WT_ERR_MSG(session, EINVAL,
"commit_timestamp is required for a prepared transaction");
-#ifdef HAVE_TIMESTAMPS
WT_ERR(__txn_commit_timestamp_validate(session));
-#endif
/*
* The default sync setting is inherited from the connection, but can
@@ -848,19 +834,15 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
break;
}
-#ifdef HAVE_TIMESTAMPS
__wt_txn_op_set_timestamp(session, op);
} else {
WT_ERR(__wt_txn_resolve_prepared_op(
session, op, true));
-#endif
}
break;
case WT_TXN_OP_REF_DELETE:
-#ifdef HAVE_TIMESTAMPS
__wt_txn_op_set_timestamp(session, op);
-#endif
break;
case WT_TXN_OP_TRUNCATE_COL:
case WT_TXN_OP_TRUNCATE_ROW:
@@ -872,7 +854,6 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
}
txn->mod_count = 0;
-#ifdef HAVE_TIMESTAMPS
/*
* Track the largest commit timestamp we have seen.
*
@@ -881,7 +862,6 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
* transaction is visible, which happens when we release it.
*/
update_timestamp = F_ISSET(txn, WT_TXN_HAS_TS_COMMIT);
-#endif
__wt_txn_release(session);
if (locked)
@@ -894,46 +874,26 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
if (!readonly)
(void)__wt_gen_next(session, WT_GEN_COMMIT);
-#ifdef HAVE_TIMESTAMPS
/* First check if we've already committed something in the future. */
if (update_timestamp) {
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(
- &prev_commit_timestamp, &txn_global->commit_timestamp));
- update_timestamp = __wt_timestamp_cmp(
- &txn->commit_timestamp, &prev_commit_timestamp) > 0;
+ prev_commit_timestamp = txn_global->commit_timestamp;
+ update_timestamp =
+ txn->commit_timestamp > prev_commit_timestamp;
}
/*
* If it looks like we need to move the global commit timestamp,
* write lock and re-check.
*/
- if (update_timestamp) {
-#if WT_TIMESTAMP_SIZE == 8
- while (__wt_timestamp_cmp(
- &txn->commit_timestamp, &prev_commit_timestamp) > 0) {
- if (__wt_atomic_cas64(
- &txn_global->commit_timestamp.val,
- prev_commit_timestamp.val,
- txn->commit_timestamp.val)) {
+ if (update_timestamp)
+ while (txn->commit_timestamp > prev_commit_timestamp) {
+ if (__wt_atomic_cas64(&txn_global->commit_timestamp,
+ prev_commit_timestamp, txn->commit_timestamp)) {
txn_global->has_commit_timestamp = true;
break;
}
- __wt_timestamp_set(
- &prev_commit_timestamp, &txn_global->commit_timestamp);
- }
-#else
- __wt_writelock(session, &txn_global->rwlock);
- if (__wt_timestamp_cmp(&txn->commit_timestamp,
- &txn_global->commit_timestamp) > 0) {
- __wt_timestamp_set(&txn_global->commit_timestamp,
- &txn->commit_timestamp);
- txn_global->has_commit_timestamp = true;
+ prev_commit_timestamp = txn_global->commit_timestamp;
}
- __wt_writeunlock(session, &txn_global->rwlock);
-#endif
- }
-#endif
/*
* We're between transactions, if we need to block for eviction, it's
@@ -963,7 +923,6 @@ err: /*
int
__wt_txn_prepare(WT_SESSION_IMPL *session, const char *cfg[])
{
-#ifdef HAVE_TIMESTAMPS
WT_TXN *txn;
WT_TXN_OP *op;
WT_UPDATE *upd;
@@ -981,7 +940,7 @@ __wt_txn_prepare(WT_SESSION_IMPL *session, const char *cfg[])
/* Parse and validate the prepare timestamp. */
WT_RET(__wt_txn_parse_prepare_timestamp(session, cfg, &ts));
- __wt_timestamp_set(&txn->prepare_timestamp, &ts);
+ txn->prepare_timestamp = ts;
/*
* We are about to release the snapshot: copy values into any
@@ -1026,15 +985,14 @@ __wt_txn_prepare(WT_SESSION_IMPL *session, const char *cfg[])
}
/* Set prepare timestamp. */
- __wt_timestamp_set(&upd->timestamp, &ts);
+ upd->timestamp = ts;
WT_PUBLISH(upd->prepare_state, WT_PREPARE_INPROGRESS);
op->u.op_upd = NULL;
WT_STAT_CONN_INCR(session, txn_prepared_updates_count);
break;
case WT_TXN_OP_REF_DELETE:
- __wt_timestamp_set(
- &op->u.ref->page_del->timestamp, &ts);
+ op->u.ref->page_del->timestamp = ts;
WT_PUBLISH(op->u.ref->page_del->prepare_state,
WT_PREPARE_INPROGRESS);
break;
@@ -1059,11 +1017,6 @@ __wt_txn_prepare(WT_SESSION_IMPL *session, const char *cfg[])
__txn_remove_from_global_table(session);
return (0);
-#else
- WT_UNUSED(cfg);
- WT_RET_MSG(session, ENOTSUP, "prepare_transaction requires a version "
- "of WiredTiger built with timestamp support");
-#endif
}
/*
@@ -1208,6 +1161,9 @@ __wt_txn_stats_update(WT_SESSION_IMPL *session)
WT_CONNECTION_IMPL *conn;
WT_CONNECTION_STATS **stats;
WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t checkpoint_timestamp;
+ wt_timestamp_t commit_timestamp;
+ wt_timestamp_t pinned_timestamp;
uint64_t checkpoint_pinned, snapshot_pinned;
conn = S2C(session);
@@ -1219,26 +1175,18 @@ __wt_txn_stats_update(WT_SESSION_IMPL *session)
WT_STAT_SET(session, stats, txn_pinned_range,
txn_global->current - txn_global->oldest_id);
-#if WT_TIMESTAMP_SIZE == 8
- {
- WT_DECL_TIMESTAMP(checkpoint_timestamp)
- WT_DECL_TIMESTAMP(commit_timestamp)
- WT_DECL_TIMESTAMP(pinned_timestamp)
-
checkpoint_timestamp = txn_global->checkpoint_timestamp;
commit_timestamp = txn_global->commit_timestamp;
pinned_timestamp = txn_global->pinned_timestamp;
- if (checkpoint_timestamp.val != 0 &&
- checkpoint_timestamp.val < pinned_timestamp.val)
+ if (checkpoint_timestamp != 0 &&
+ checkpoint_timestamp < pinned_timestamp)
pinned_timestamp = checkpoint_timestamp;
WT_STAT_SET(session, stats, txn_pinned_timestamp,
- commit_timestamp.val - pinned_timestamp.val);
+ commit_timestamp - pinned_timestamp);
WT_STAT_SET(session, stats, txn_pinned_timestamp_checkpoint,
- commit_timestamp.val - checkpoint_timestamp.val);
+ commit_timestamp - checkpoint_timestamp);
WT_STAT_SET(session, stats, txn_pinned_timestamp_oldest,
- commit_timestamp.val - txn_global->oldest_timestamp.val);
- }
-#endif
+ commit_timestamp - txn_global->oldest_timestamp);
WT_STAT_SET(session, stats, txn_pinned_snapshot_range,
snapshot_pinned == WT_TXN_NONE ?
@@ -1398,7 +1346,6 @@ __wt_txn_activity_drain(WT_SESSION_IMPL *session)
void
__wt_txn_global_shutdown(WT_SESSION_IMPL *session)
{
-#ifdef HAVE_TIMESTAMPS
/*
* All application transactions have completed, ignore the pinned
* timestamp so that updates can be evicted from the cache during
@@ -1409,9 +1356,6 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session)
* set.
*/
S2C(session)->txn_global.has_pinned_timestamp = false;
-#else
- WT_UNUSED(session);
-#endif
}
/*
@@ -1421,9 +1365,7 @@ __wt_txn_global_shutdown(WT_SESSION_IMPL *session)
int
__wt_verbose_dump_txn_one(WT_SESSION_IMPL *session, WT_TXN *txn)
{
-#ifdef HAVE_TIMESTAMPS
- char hex_timestamp[3][2 * WT_TIMESTAMP_SIZE + 1];
-#endif
+ char hex_timestamp[3][WT_TS_HEX_SIZE];
const char *iso_tag;
WT_NOT_READ(iso_tag, "INVALID");
@@ -1438,13 +1380,10 @@ __wt_verbose_dump_txn_one(WT_SESSION_IMPL *session, WT_TXN *txn)
iso_tag = "WT_ISO_SNAPSHOT";
break;
}
-#ifdef HAVE_TIMESTAMPS
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &txn->commit_timestamp));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[1], &txn->first_commit_timestamp));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[2], &txn->read_timestamp));
+ __wt_timestamp_to_hex_string(hex_timestamp[0], txn->commit_timestamp);
+ __wt_timestamp_to_hex_string(
+ hex_timestamp[1], txn->first_commit_timestamp);
+ __wt_timestamp_to_hex_string(hex_timestamp[2], txn->read_timestamp);
WT_RET(__wt_msg(session,
"mod count: %u"
", snap min: %" PRIu64
@@ -1462,19 +1401,6 @@ __wt_verbose_dump_txn_one(WT_SESSION_IMPL *session, WT_TXN *txn)
hex_timestamp[2],
txn->flags,
iso_tag));
-#else
- WT_RET(__wt_msg(session,
- "mod count: %u"
- ", snap min: %" PRIu64
- ", snap max: %" PRIu64
- ", flags: 0x%08" PRIx32
- ", isolation: %s",
- txn->mod_count,
- txn->snap_min,
- txn->snap_max,
- txn->flags,
- iso_tag));
-#endif
return (0);
}
@@ -1491,9 +1417,7 @@ __wt_verbose_dump_txn(WT_SESSION_IMPL *session)
WT_TXN_STATE *s;
uint64_t id;
uint32_t i, session_cnt;
-#ifdef HAVE_TIMESTAMPS
- char hex_timestamp[3][2 * WT_TIMESTAMP_SIZE + 1];
-#endif
+ char hex_timestamp[3][WT_TS_HEX_SIZE];
conn = S2C(session);
txn_global = &conn->txn_global;
@@ -1508,18 +1432,17 @@ __wt_verbose_dump_txn(WT_SESSION_IMPL *session)
"metadata_pinned ID: %" PRIu64, txn_global->metadata_pinned));
WT_RET(__wt_msg(session, "oldest ID: %" PRIu64, txn_global->oldest_id));
-#ifdef HAVE_TIMESTAMPS
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &txn_global->commit_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp[0], txn_global->commit_timestamp);
WT_RET(__wt_msg(session, "commit timestamp: %s", hex_timestamp[0]));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &txn_global->oldest_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp[0], txn_global->oldest_timestamp);
WT_RET(__wt_msg(session, "oldest timestamp: %s", hex_timestamp[0]));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &txn_global->pinned_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp[0], txn_global->pinned_timestamp);
WT_RET(__wt_msg(session, "pinned timestamp: %s", hex_timestamp[0]));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &txn_global->stable_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp[0], txn_global->stable_timestamp);
WT_RET(__wt_msg(session, "stable timestamp: %s", hex_timestamp[0]));
WT_RET(__wt_msg(session, "has_commit_timestamp: %s",
txn_global->has_commit_timestamp ? "yes" : "no"));
@@ -1533,7 +1456,6 @@ __wt_verbose_dump_txn(WT_SESSION_IMPL *session)
txn_global->oldest_is_pinned ? "yes" : "no"));
WT_RET(__wt_msg(session, "stable_is_pinned: %s",
txn_global->stable_is_pinned ? "yes" : "no"));
-#endif
WT_RET(__wt_msg(session, "checkpoint running: %s",
txn_global->checkpoint_running ? "yes" : "no"));
diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
index bddf8d926f4..3e377043fa7 100644
--- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c
+++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
@@ -634,7 +634,6 @@ __checkpoint_prepare(
txn_state->id = txn_state->pinned_id =
txn_state->metadata_pinned = WT_TXN_NONE;
-#ifdef HAVE_TIMESTAMPS
/*
* Set the checkpoint transaction's timestamp, if requested.
*
@@ -654,29 +653,22 @@ __checkpoint_prepare(
* timestamp until its checkpoint is complete.
*/
if (txn_global->has_stable_timestamp) {
- __wt_timestamp_set(&txn->read_timestamp,
- &txn_global->stable_timestamp);
- __wt_timestamp_set(&txn_global->checkpoint_timestamp,
- &txn->read_timestamp);
+ txn->read_timestamp = txn_global->stable_timestamp;
+ txn_global->checkpoint_timestamp = txn->read_timestamp;
F_SET(txn, WT_TXN_HAS_TS_READ);
if (!F_ISSET(conn, WT_CONN_RECOVERING))
- __wt_timestamp_set(
- &txn_global->meta_ckpt_timestamp,
- &txn->read_timestamp);
+ txn_global->meta_ckpt_timestamp =
+ txn->read_timestamp;
} else if (!F_ISSET(conn, WT_CONN_RECOVERING))
- __wt_timestamp_set(&txn_global->meta_ckpt_timestamp,
- &txn_global->recovery_timestamp);
+ txn_global->meta_ckpt_timestamp =
+ txn_global->recovery_timestamp;
} else if (!F_ISSET(conn, WT_CONN_RECOVERING))
- __wt_timestamp_set_zero(&txn_global->meta_ckpt_timestamp);
-#else
- WT_UNUSED(use_timestamp);
-#endif
+ txn_global->meta_ckpt_timestamp = 0;
__wt_writeunlock(session, &txn_global->rwlock);
-#ifdef HAVE_TIMESTAMPS
if (F_ISSET(txn, WT_TXN_HAS_TS_READ)) {
- __wt_verbose_timestamp(session, &txn->read_timestamp,
+ __wt_verbose_timestamp(session, txn->read_timestamp,
"Checkpoint requested at stable timestamp");
/*
@@ -687,7 +679,6 @@ __checkpoint_prepare(
*/
__wt_txn_get_snapshot(session);
}
-#endif
/*
* Get a list of handles we want to flush; for named checkpoints this
@@ -768,22 +759,17 @@ __txn_checkpoint_can_skip(WT_SESSION_IMPL *session,
return (0);
}
-#ifdef HAVE_TIMESTAMPS
/*
* If the checkpoint is using timestamps, and the stable timestamp
* hasn't been updated since the last checkpoint there is nothing
* more that could be written.
*/
if (use_timestamp && txn_global->has_stable_timestamp &&
- !__wt_timestamp_iszero(&txn_global->last_ckpt_timestamp) &&
- __wt_timestamp_cmp(&txn_global->last_ckpt_timestamp,
- &txn_global->stable_timestamp) == 0) {
+ txn_global->last_ckpt_timestamp != 0 &&
+ txn_global->last_ckpt_timestamp == txn_global->stable_timestamp) {
*can_skipp = true;
return (0);
}
-#else
- WT_UNUSED(txn_global);
-#endif
return (0);
}
@@ -798,10 +784,10 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
WT_CACHE *cache;
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
- WT_DECL_TIMESTAMP(ckpt_tmp_ts)
WT_TXN *txn;
WT_TXN_GLOBAL *txn_global;
WT_TXN_ISOLATION saved_isolation;
+ wt_timestamp_t ckpt_tmp_ts;
uint64_t fsync_duration_usecs, generation, time_start, time_stop;
u_int i;
bool can_skip, failed, full, idle, logging, tracking, use_timestamp;
@@ -928,7 +914,6 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
*/
session->dhandle = NULL;
-#ifdef HAVE_TIMESTAMPS
/*
* Record the timestamp from the transaction if we were successful.
* Store it in a temp variable now because it will be invalidated during
@@ -936,12 +921,11 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
* is successful. We have to set the system information before we
* release the snapshot.
*/
- __wt_timestamp_set_zero(&ckpt_tmp_ts);
+ ckpt_tmp_ts = 0;
if (full) {
WT_ERR(__wt_meta_sysinfo_set(session));
- __wt_timestamp_set(&ckpt_tmp_ts, &txn->read_timestamp);
+ ckpt_tmp_ts = txn->read_timestamp;
}
-#endif
/* Release the snapshot so we aren't pinning updates in cache. */
__wt_txn_release_snapshot(session);
@@ -1016,7 +1000,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
if (full) {
__checkpoint_stats(session);
-#ifdef HAVE_TIMESTAMPS
+
/*
* If timestamps were used to define the content of the
* checkpoint update the saved last checkpoint timestamp,
@@ -1025,10 +1009,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
* the saved last checkpoint timestamp regardless.
*/
if (use_timestamp)
- __wt_timestamp_set(
- &conn->txn_global.last_ckpt_timestamp,
- &ckpt_tmp_ts);
-#endif
+ conn->txn_global.last_ckpt_timestamp = ckpt_tmp_ts;
}
err: /*
@@ -1884,7 +1865,7 @@ __wt_checkpoint_close(WT_SESSION_IMPL *session, bool final)
WT_RET(__wt_txn_update_oldest(
session, WT_TXN_OLDEST_STRICT | WT_TXN_OLDEST_WAIT));
return (__wt_txn_visible_all(session, btree->rec_max_txn,
- WT_TIMESTAMP_NULL(&btree->rec_max_timestamp)) ?
+ btree->rec_max_timestamp) ?
__wt_cache_op(session, WT_SYNC_DISCARD) : EBUSY);
}
diff --git a/src/third_party/wiredtiger/src/txn/txn_ext.c b/src/third_party/wiredtiger/src/txn/txn_ext.c
index e0401c83be5..8617d3f0bec 100644
--- a/src/third_party/wiredtiger/src/txn/txn_ext.c
+++ b/src/third_party/wiredtiger/src/txn/txn_ext.c
@@ -102,5 +102,5 @@ __wt_ext_transaction_visible(
(void)wt_api; /* Unused parameters */
return (__wt_txn_visible(
- (WT_SESSION_IMPL *)wt_session, transaction_id, NULL));
+ (WT_SESSION_IMPL *)wt_session, transaction_id, WT_TS_NONE));
}
diff --git a/src/third_party/wiredtiger/src/txn/txn_nsnap.c b/src/third_party/wiredtiger/src/txn/txn_nsnap.c
index ed1d5407de4..8ab76e2f745 100644
--- a/src/third_party/wiredtiger/src/txn/txn_nsnap.c
+++ b/src/third_party/wiredtiger/src/txn/txn_nsnap.c
@@ -43,13 +43,13 @@ __nsnap_drop_one(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *name)
/* Bump the global ID if we are removing the first entry */
if (found == TAILQ_FIRST(&txn_global->nsnaph)) {
WT_ASSERT(session, !__wt_txn_visible_all(
- session, txn_global->nsnap_oldest_id, NULL));
+ session, txn_global->nsnap_oldest_id, WT_TS_NONE));
txn_global->nsnap_oldest_id = (TAILQ_NEXT(found, q) != NULL) ?
TAILQ_NEXT(found, q)->pinned_id : WT_TXN_NONE;
WT_DIAGNOSTIC_YIELD;
WT_ASSERT(session, txn_global->nsnap_oldest_id == WT_TXN_NONE ||
!__wt_txn_visible_all(
- session, txn_global->nsnap_oldest_id, NULL));
+ session, txn_global->nsnap_oldest_id, WT_TS_NONE));
}
TAILQ_REMOVE(&txn_global->nsnaph, found, q);
__nsnap_destroy(session, found);
@@ -123,14 +123,14 @@ __nsnap_drop_to(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *name, bool inclusive)
/* Now that the queue of named snapshots is updated, update the ID */
WT_ASSERT(session, !__wt_txn_visible_all(
- session, txn_global->nsnap_oldest_id, NULL) &&
+ session, txn_global->nsnap_oldest_id, WT_TS_NONE) &&
(new_nsnap_oldest == WT_TXN_NONE ||
WT_TXNID_LE(txn_global->nsnap_oldest_id, new_nsnap_oldest)));
txn_global->nsnap_oldest_id = new_nsnap_oldest;
WT_DIAGNOSTIC_YIELD;
WT_ASSERT(session,
new_nsnap_oldest == WT_TXN_NONE ||
- !__wt_txn_visible_all(session, new_nsnap_oldest, NULL));
+ !__wt_txn_visible_all(session, new_nsnap_oldest, WT_TS_NONE));
return (0);
}
@@ -210,7 +210,8 @@ __wt_txn_named_snapshot_begin(WT_SESSION_IMPL *session, const char *cfg[])
if (TAILQ_EMPTY(&txn_global->nsnaph)) {
WT_ASSERT(session, txn_global->nsnap_oldest_id == WT_TXN_NONE &&
- !__wt_txn_visible_all(session, nsnap_new->pinned_id, NULL));
+ !__wt_txn_visible_all(
+ session, nsnap_new->pinned_id, WT_TS_NONE));
__wt_readlock(session, &txn_global->rwlock);
txn_global->nsnap_oldest_id = nsnap_new->pinned_id;
__wt_readunlock(session, &txn_global->rwlock);
@@ -226,7 +227,7 @@ err: if (started_txn) {
WT_TRET(__wt_txn_rollback(session, NULL));
WT_DIAGNOSTIC_YIELD;
WT_ASSERT(session,
- !__wt_txn_visible_all(session, pinned_id, NULL));
+ !__wt_txn_visible_all(session, pinned_id, WT_TS_NONE));
}
if (nsnap_new != NULL)
@@ -310,7 +311,7 @@ __wt_txn_named_snapshot_get(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *nameval)
__wt_readunlock(session, &txn_global->rwlock);
WT_ASSERT(session, !__wt_txn_visible_all(
- session, txn_state->pinned_id, NULL) &&
+ session, txn_state->pinned_id, WT_TS_NONE) &&
txn_global->nsnap_oldest_id != WT_TXN_NONE &&
WT_TXNID_LE(txn_global->nsnap_oldest_id,
txn_state->pinned_id));
diff --git a/src/third_party/wiredtiger/src/txn/txn_recover.c b/src/third_party/wiredtiger/src/txn/txn_recover.c
index 7c7a02fb9fb..72accb7e38f 100644
--- a/src/third_party/wiredtiger/src/txn/txn_recover.c
+++ b/src/third_party/wiredtiger/src/txn/txn_recover.c
@@ -355,13 +355,12 @@ __txn_log_recover(WT_SESSION_IMPL *session,
static int
__recovery_set_checkpoint_timestamp(WT_RECOVERY *r)
{
-#ifdef HAVE_TIMESTAMPS
WT_CONFIG_ITEM cval;
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
- WT_DECL_TIMESTAMP(ckpt_timestamp)
WT_SESSION_IMPL *session;
- char *sys_config;
+ wt_timestamp_t ckpt_timestamp;
+ char hex_timestamp[WT_TS_HEX_SIZE], *sys_config;
sys_config = NULL;
@@ -372,7 +371,7 @@ __recovery_set_checkpoint_timestamp(WT_RECOVERY *r)
* save the stable timestamp of the last checkpoint for later query.
* This gets saved in the connection.
*/
- __wt_timestamp_set_zero(&ckpt_timestamp);
+ ckpt_timestamp = 0;
/* Search in the metadata for the system information. */
WT_ERR_NOTFOUND_OK(
@@ -395,26 +394,19 @@ __recovery_set_checkpoint_timestamp(WT_RECOVERY *r)
* timestamp so that the checkpoint after recovery writes the correct
* value into the metadata.
*/
- __wt_timestamp_set(
- &conn->txn_global.meta_ckpt_timestamp, &ckpt_timestamp);
- __wt_timestamp_set(
- &conn->txn_global.recovery_timestamp, &ckpt_timestamp);
+ conn->txn_global.meta_ckpt_timestamp =
+ conn->txn_global.recovery_timestamp = ckpt_timestamp;
if (WT_VERBOSE_ISSET(session,
WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS)) {
- char hex_timestamp[2 * WT_TIMESTAMP_SIZE + 1];
- WT_TRET(__wt_timestamp_to_hex_string(session,
- hex_timestamp, &conn->txn_global.recovery_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, conn->txn_global.recovery_timestamp);
__wt_verbose(session,
WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS,
"Set global recovery timestamp: %s", hex_timestamp);
}
err: __wt_free(session, sys_config);
return (ret);
-#else
- WT_UNUSED(r);
- return (0);
-#endif
}
/*
@@ -554,10 +546,8 @@ __wt_txn_recover(WT_SESSION_IMPL *session)
r.session = session;
WT_MAX_LSN(&r.max_ckpt_lsn);
WT_MAX_LSN(&r.max_rec_lsn);
-#ifdef HAVE_TIMESTAMPS
- __wt_timestamp_set_zero(&conn->txn_global.recovery_timestamp);
- __wt_timestamp_set_zero(&conn->txn_global.meta_ckpt_timestamp);
-#endif
+ conn->txn_global.recovery_timestamp =
+ conn->txn_global.meta_ckpt_timestamp = 0;
F_SET(conn, WT_CONN_RECOVERING);
WT_ERR(__wt_metadata_search(session, WT_METAFILE_URI, &config));
@@ -639,6 +629,15 @@ __wt_txn_recover(WT_SESSION_IMPL *session)
}
if (F_ISSET(conn, WT_CONN_SALVAGE))
ret = 0;
+ /*
+ * If log scan couldn't find a file we expected to be around,
+ * this indicates a corruption of some sort.
+ */
+ if (ret == ENOENT) {
+ F_SET(conn, WT_CONN_DATA_CORRUPTION);
+ ret = WT_ERROR;
+ }
+
WT_ERR(ret);
}
diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c
index aa4512b80b1..7b8e2ca06ae 100644
--- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c
+++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c
@@ -8,7 +8,6 @@
#include "wt_internal.h"
-#ifdef HAVE_TIMESTAMPS
/*
* __txn_rollback_to_stable_lookaside_fixup --
* Remove any updates that need to be rolled back from the lookaside file.
@@ -19,10 +18,9 @@ __txn_rollback_to_stable_lookaside_fixup(WT_SESSION_IMPL *session)
WT_CONNECTION_IMPL *conn;
WT_CURSOR *cursor;
WT_DECL_RET;
- WT_DECL_TIMESTAMP(rollback_timestamp)
- WT_DECL_TIMESTAMP(upd_timestamp)
- WT_ITEM las_key, las_timestamp, las_value;
+ WT_ITEM las_key, las_value;
WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t las_timestamp, rollback_timestamp;
uint64_t las_counter, las_pageid, las_total, las_txnid;
uint32_t las_id, session_flags;
uint8_t prepare_state, upd_type;
@@ -31,7 +29,6 @@ __txn_rollback_to_stable_lookaside_fixup(WT_SESSION_IMPL *session)
cursor = NULL;
las_total = 0;
session_flags = 0; /* [-Werror=maybe-uninitialized] */
- WT_CLEAR(las_timestamp);
/*
* Copy the stable timestamp, otherwise we'd need to lock it each time
@@ -40,9 +37,7 @@ __txn_rollback_to_stable_lookaside_fixup(WT_SESSION_IMPL *session)
* violate protocol.
*/
txn_global = &conn->txn_global;
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(
- &rollback_timestamp, &txn_global->stable_timestamp));
+ WT_ORDERED_READ(rollback_timestamp, txn_global->stable_timestamp);
__wt_las_cursor(session, &cursor, &session_flags);
@@ -66,16 +61,13 @@ __txn_rollback_to_stable_lookaside_fixup(WT_SESSION_IMPL *session)
WT_ERR(cursor->get_value(cursor, &las_txnid,
&las_timestamp, &prepare_state, &upd_type, &las_value));
- WT_ASSERT(session, las_timestamp.size == WT_TIMESTAMP_SIZE);
- memcpy(&upd_timestamp, las_timestamp.data, las_timestamp.size);
/*
* Entries with no timestamp will have a timestamp of zero,
* which will fail the following check and cause them to never
* be removed.
*/
- if (__wt_timestamp_cmp(
- &rollback_timestamp, &upd_timestamp) < 0) {
+ if (rollback_timestamp < las_timestamp) {
WT_ERR(cursor->remove(cursor));
WT_STAT_CONN_INCR(session, txn_rollback_las_removed);
--las_total;
@@ -101,7 +93,7 @@ err: if (ret == 0) {
*/
static void
__txn_abort_newer_update(WT_SESSION_IMPL *session,
- WT_UPDATE *first_upd, wt_timestamp_t *rollback_timestamp)
+ WT_UPDATE *first_upd, wt_timestamp_t rollback_timestamp)
{
WT_UPDATE *upd;
@@ -112,12 +104,10 @@ __txn_abort_newer_update(WT_SESSION_IMPL *session,
* strict timestamp checking, assert that all more recent
* updates were also rolled back.
*/
- if (upd->txnid == WT_TXN_ABORTED ||
- __wt_timestamp_iszero(&upd->timestamp)) {
+ if (upd->txnid == WT_TXN_ABORTED || upd->timestamp == 0) {
if (upd == first_upd)
first_upd = upd->next;
- } else if (__wt_timestamp_cmp(
- rollback_timestamp, &upd->timestamp) < 0) {
+ } else if (rollback_timestamp < upd->timestamp) {
/*
* If any updates are aborted, all newer updates
* better be aborted as well.
@@ -135,7 +125,7 @@ __txn_abort_newer_update(WT_SESSION_IMPL *session,
upd->txnid = WT_TXN_ABORTED;
WT_STAT_CONN_INCR(session, txn_rollback_upd_aborted);
- __wt_timestamp_set_zero(&upd->timestamp);
+ upd->timestamp = 0;
}
}
}
@@ -146,7 +136,7 @@ __txn_abort_newer_update(WT_SESSION_IMPL *session,
*/
static void
__txn_abort_newer_insert(WT_SESSION_IMPL *session,
- WT_INSERT_HEAD *head, wt_timestamp_t *rollback_timestamp)
+ WT_INSERT_HEAD *head, wt_timestamp_t rollback_timestamp)
{
WT_INSERT *ins;
@@ -161,7 +151,7 @@ __txn_abort_newer_insert(WT_SESSION_IMPL *session,
*/
static void
__txn_abort_newer_col_var(
- WT_SESSION_IMPL *session, WT_PAGE *page, wt_timestamp_t *rollback_timestamp)
+ WT_SESSION_IMPL *session, WT_PAGE *page, wt_timestamp_t rollback_timestamp)
{
WT_COL *cip;
WT_INSERT_HEAD *ins;
@@ -185,7 +175,7 @@ __txn_abort_newer_col_var(
*/
static void
__txn_abort_newer_col_fix(
- WT_SESSION_IMPL *session, WT_PAGE *page, wt_timestamp_t *rollback_timestamp)
+ WT_SESSION_IMPL *session, WT_PAGE *page, wt_timestamp_t rollback_timestamp)
{
WT_INSERT_HEAD *ins;
@@ -205,7 +195,7 @@ __txn_abort_newer_col_fix(
*/
static void
__txn_abort_newer_row_leaf(
- WT_SESSION_IMPL *session, WT_PAGE *page, wt_timestamp_t *rollback_timestamp)
+ WT_SESSION_IMPL *session, WT_PAGE *page, wt_timestamp_t rollback_timestamp)
{
WT_INSERT_HEAD *insert;
WT_ROW *rip;
@@ -240,7 +230,7 @@ __txn_abort_newer_row_leaf(
*/
static int
__txn_abort_newer_updates(
- WT_SESSION_IMPL *session, WT_REF *ref, wt_timestamp_t *rollback_timestamp)
+ WT_SESSION_IMPL *session, WT_REF *ref, wt_timestamp_t rollback_timestamp)
{
WT_DECL_RET;
WT_PAGE *page;
@@ -257,8 +247,7 @@ __txn_abort_newer_updates(
local_read = false;
read_flags = WT_READ_WONT_NEED;
if (ref->page_las != NULL && ref->page_las->skew_newest &&
- __wt_timestamp_cmp(rollback_timestamp,
- &ref->page_las->unstable_timestamp) < 0) {
+ rollback_timestamp < ref->page_las->unstable_timestamp) {
/* Make sure get back a page with history, not limbo page */
WT_ASSERT(session,
!F_ISSET(&session->txn, WT_TXN_HAS_SNAPSHOT));
@@ -269,8 +258,8 @@ __txn_abort_newer_updates(
}
/* Review deleted page saved to the ref */
- if (ref->page_del != NULL && __wt_timestamp_cmp(
- rollback_timestamp, &ref->page_del->timestamp) < 0)
+ if (ref->page_del != NULL &&
+ rollback_timestamp < ref->page_del->timestamp)
WT_ERR(__wt_delete_page_rollback(session, ref));
/*
@@ -323,7 +312,7 @@ err: if (local_read)
*/
static int
__txn_rollback_to_stable_btree_walk(
- WT_SESSION_IMPL *session, wt_timestamp_t *rollback_timestamp)
+ WT_SESSION_IMPL *session, wt_timestamp_t rollback_timestamp)
{
WT_DECL_RET;
WT_REF *child_ref, *ref;
@@ -369,8 +358,8 @@ __txn_rollback_to_stable_btree(WT_SESSION_IMPL *session, const char *cfg[])
WT_BTREE *btree;
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
- WT_DECL_TIMESTAMP(rollback_timestamp)
WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t rollback_timestamp;
WT_UNUSED(cfg);
@@ -413,9 +402,7 @@ __txn_rollback_to_stable_btree(WT_SESSION_IMPL *session, const char *cfg[])
* updated while rolling back, accessing it without a lock would
* violate protocol.
*/
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(
- &rollback_timestamp, &txn_global->stable_timestamp));
+ WT_ORDERED_READ(rollback_timestamp, txn_global->stable_timestamp);
/*
* Ensure the eviction server is out of the file - we don't
@@ -424,8 +411,8 @@ __txn_rollback_to_stable_btree(WT_SESSION_IMPL *session, const char *cfg[])
* be in.
*/
WT_RET(__wt_evict_file_exclusive_on(session));
- WT_WITH_PAGE_INDEX(session, ret = __txn_rollback_to_stable_btree_walk(
- session, &rollback_timestamp));
+ WT_WITH_PAGE_INDEX(session, ret =
+ __txn_rollback_to_stable_btree_walk(session, rollback_timestamp));
__wt_evict_file_exclusive_off(session);
return (ret);
@@ -465,7 +452,6 @@ __txn_rollback_to_stable_check(WT_SESSION_IMPL *session)
return (ret);
}
-#endif
/*
* __wt_txn_rollback_to_stable --
@@ -475,12 +461,6 @@ __txn_rollback_to_stable_check(WT_SESSION_IMPL *session)
int
__wt_txn_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[])
{
-#ifndef HAVE_TIMESTAMPS
- WT_UNUSED(cfg);
-
- WT_RET_MSG(session, ENOTSUP, "rollback_to_stable "
- "requires a version of WiredTiger built with timestamp support");
-#else
WT_CONNECTION_IMPL *conn;
WT_DECL_RET;
@@ -529,5 +509,4 @@ __wt_txn_rollback_to_stable(WT_SESSION_IMPL *session, const char *cfg[])
err: F_CLR(conn, WT_CONN_EVICTION_NO_LOOKASIDE);
__wt_free(session, conn->stable_rollback_bitstring);
return (ret);
-#endif
}
diff --git a/src/third_party/wiredtiger/src/txn/txn_timestamp.c b/src/third_party/wiredtiger/src/txn/txn_timestamp.c
index 3cb8bf79ef7..b58152f8599 100644
--- a/src/third_party/wiredtiger/src/txn/txn_timestamp.c
+++ b/src/third_party/wiredtiger/src/txn/txn_timestamp.c
@@ -8,7 +8,6 @@
#include "wt_internal.h"
-#ifdef HAVE_TIMESTAMPS
/* AUTOMATIC FLAG VALUE GENERATION START */
#define WT_TXN_TS_ALREADY_LOCKED 0x1u
#define WT_TXN_TS_INCLUDE_CKPT 0x2u
@@ -19,26 +18,19 @@
* __wt_timestamp_to_hex_string --
* Convert a timestamp to hex string representation.
*/
-int
-__wt_timestamp_to_hex_string(
- WT_SESSION_IMPL *session, char *hex_timestamp, const wt_timestamp_t *ts_src)
+void
+__wt_timestamp_to_hex_string(char *hex_timestamp, wt_timestamp_t ts)
{
- wt_timestamp_t ts;
-
- __wt_timestamp_set(&ts, ts_src);
+ char *p, v;
- if (__wt_timestamp_iszero(&ts)) {
+ if (ts == 0) {
hex_timestamp[0] = '0';
hex_timestamp[1] = '\0';
- return (0);
+ return;
}
-#if WT_TIMESTAMP_SIZE == 8
- {
- char *p, v;
-
- for (p = hex_timestamp; ts.val != 0; ts.val >>= 4)
- *p++ = (char)__wt_hex((u_char)(ts.val & 0x0f));
+ for (p = hex_timestamp; ts != 0; ts >>= 4)
+ *p++ = (char)__wt_hex((u_char)(ts & 0x0f));
*p = '\0';
/* Reverse the string. */
@@ -47,26 +39,6 @@ __wt_timestamp_to_hex_string(
*p-- = *hex_timestamp;
*hex_timestamp++ = v;
}
- WT_UNUSED(session);
- }
-#else
- {
- WT_ITEM hexts;
- size_t len;
- uint8_t *tsp;
-
- /* Avoid memory allocation: set up an item guaranteed large enough. */
- hexts.data = hexts.mem = hex_timestamp;
- hexts.memsize = 2 * WT_TIMESTAMP_SIZE + 1;
- /* Trim leading zeros. */
- for (tsp = ts.ts, len = WT_TIMESTAMP_SIZE;
- len > 0 && *tsp == 0;
- ++tsp, --len)
- ;
- WT_RET(__wt_raw_to_hex(session, tsp, len, &hexts));
- }
-#endif
- return (0);
}
/*
@@ -74,15 +46,15 @@ __wt_timestamp_to_hex_string(
* Output a verbose message along with the specified timestamp.
*/
void
-__wt_verbose_timestamp(WT_SESSION_IMPL *session,
- const wt_timestamp_t *ts, const char *msg)
+__wt_verbose_timestamp(
+ WT_SESSION_IMPL *session, wt_timestamp_t ts, const char *msg)
{
- char timestamp_buf[2 * WT_TIMESTAMP_SIZE + 1];
+ char timestamp_buf[WT_TS_HEX_SIZE];
- if (!WT_VERBOSE_ISSET(session, WT_VERB_TIMESTAMP) ||
- (__wt_timestamp_to_hex_string(session, timestamp_buf, ts) != 0))
- return;
+ if (!WT_VERBOSE_ISSET(session, WT_VERB_TIMESTAMP))
+ return;
+ __wt_timestamp_to_hex_string(timestamp_buf, ts);
__wt_verbose(session,
WT_VERB_TIMESTAMP, "Timestamp %s : %s", timestamp_buf, msg);
}
@@ -95,19 +67,6 @@ int
__wt_txn_parse_timestamp_raw(WT_SESSION_IMPL *session, const char *name,
wt_timestamp_t *timestamp, WT_CONFIG_ITEM *cval)
{
- __wt_timestamp_set_zero(timestamp);
-
- if (cval->len == 0)
- return (0);
-
- /* Protect against unexpectedly long hex strings. */
- if (cval->len > 2 * WT_TIMESTAMP_SIZE)
- WT_RET_MSG(session, EINVAL,
- "%s timestamp too long '%.*s'",
- name, (int)cval->len, cval->str);
-
-#if WT_TIMESTAMP_SIZE == 8
- {
static const int8_t hextable[] = {
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
@@ -128,7 +87,18 @@ __wt_txn_parse_timestamp_raw(WT_SESSION_IMPL *session, const char *name,
int hex_val;
const char *hex_itr;
- for (ts.val = 0, hex_itr = cval->str, len = cval->len; len > 0; --len) {
+ *timestamp = 0;
+
+ if (cval->len == 0)
+ return (0);
+
+ /* Protect against unexpectedly long hex strings. */
+ if (cval->len > 2 * sizeof(wt_timestamp_t))
+ WT_RET_MSG(session, EINVAL,
+ "%s timestamp too long '%.*s'",
+ name, (int)cval->len, cval->str);
+
+ for (ts = 0, hex_itr = cval->str, len = cval->len; len > 0; --len) {
if ((size_t)*hex_itr < WT_ELEMENTS(hextable))
hex_val = hextable[(size_t)*hex_itr++];
else
@@ -137,47 +107,10 @@ __wt_txn_parse_timestamp_raw(WT_SESSION_IMPL *session, const char *name,
WT_RET_MSG(session, EINVAL,
"Failed to parse %s timestamp '%.*s'",
name, (int)cval->len, cval->str);
- ts.val = (ts.val << 4) | (uint64_t)hex_val;
+ ts = (ts << 4) | (uint64_t)hex_val;
}
- __wt_timestamp_set(timestamp, &ts);
- }
-#else
- {
- WT_DECL_RET;
- WT_ITEM ts;
- wt_timestamp_t tsbuf;
- size_t hexlen;
- const char *hexts;
- char padbuf[2 * WT_TIMESTAMP_SIZE + 1];
-
- /*
- * The decoding function assumes it is decoding data produced by dump
- * and so requires an even number of hex digits.
- */
- if ((cval->len & 1) == 0) {
- hexts = cval->str;
- hexlen = cval->len;
- } else {
- padbuf[0] = '0';
- memcpy(padbuf + 1, cval->str, cval->len);
- hexts = padbuf;
- hexlen = cval->len + 1;
- }
-
- /* Avoid memory allocation to decode timestamps. */
- ts.data = ts.mem = tsbuf.ts;
- ts.memsize = sizeof(tsbuf.ts);
-
- if ((ret = __wt_nhex_to_raw(session, hexts, hexlen, &ts)) != 0)
- WT_RET_MSG(session, ret, "Failed to parse %s timestamp '%.*s'",
- name, (int)cval->len, cval->str);
- WT_ASSERT(session, ts.size <= WT_TIMESTAMP_SIZE);
+ *timestamp = ts;
- /* Copy the raw value to the end of the timestamp. */
- memcpy(timestamp->ts + WT_TIMESTAMP_SIZE - ts.size,
- ts.data, ts.size);
- }
-#endif
return (0);
}
@@ -190,7 +123,7 @@ __wt_txn_parse_timestamp(WT_SESSION_IMPL *session, const char *name,
wt_timestamp_t *timestamp, WT_CONFIG_ITEM *cval)
{
WT_RET(__wt_txn_parse_timestamp_raw(session, name, timestamp, cval));
- if (cval->len != 0 && __wt_timestamp_iszero(timestamp))
+ if (cval->len != 0 && *timestamp == 0)
WT_RET_MSG(session, EINVAL,
"Failed to parse %s timestamp '%.*s': zero not permitted",
name, (int)cval->len, cval->str);
@@ -207,9 +140,9 @@ __txn_get_pinned_timestamp(
WT_SESSION_IMPL *session, wt_timestamp_t *tsp, uint32_t flags)
{
WT_CONNECTION_IMPL *conn;
- WT_DECL_TIMESTAMP(tmp_ts)
WT_TXN *txn;
WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t tmp_ts;
bool include_oldest, txn_has_write_lock;
conn = S2C(session);
@@ -222,18 +155,14 @@ __txn_get_pinned_timestamp(
if (!txn_has_write_lock)
__wt_readlock(session, &txn_global->rwlock);
- if (include_oldest)
- __wt_timestamp_set(&tmp_ts, &txn_global->oldest_timestamp);
- else
- __wt_timestamp_set_zero(&tmp_ts);
+
+ tmp_ts = include_oldest ? txn_global->oldest_timestamp : 0;
/* Check for a running checkpoint */
if (LF_ISSET(WT_TXN_TS_INCLUDE_CKPT) &&
- !__wt_timestamp_iszero(&txn_global->checkpoint_timestamp) &&
- (__wt_timestamp_iszero(&tmp_ts) ||
- __wt_timestamp_cmp(&txn_global->checkpoint_timestamp, &tmp_ts) <
- 0))
- __wt_timestamp_set(&tmp_ts, &txn_global->checkpoint_timestamp);
+ txn_global->checkpoint_timestamp != 0 &&
+ (tmp_ts == 0 || txn_global->checkpoint_timestamp < tmp_ts))
+ tmp_ts = txn_global->checkpoint_timestamp;
if (!txn_has_write_lock)
__wt_readunlock(session, &txn_global->rwlock);
@@ -249,9 +178,8 @@ __txn_get_pinned_timestamp(
* A zero timestamp is possible here only when the oldest
* timestamp is not accounted for.
*/
- if (__wt_timestamp_iszero(&tmp_ts) ||
- __wt_timestamp_cmp(&txn->read_timestamp, &tmp_ts) < 0)
- __wt_timestamp_set(&tmp_ts, &txn->read_timestamp);
+ if (tmp_ts == 0 || txn->read_timestamp < tmp_ts)
+ tmp_ts = txn->read_timestamp;
/*
* We break on the first active txn on the list.
*/
@@ -259,9 +187,9 @@ __txn_get_pinned_timestamp(
}
__wt_readunlock(session, &txn_global->read_timestamp_rwlock);
- if (!include_oldest && __wt_timestamp_iszero(&tmp_ts))
+ if (!include_oldest && tmp_ts == 0)
return (WT_NOTFOUND);
- __wt_timestamp_set(tsp, &tmp_ts);
+ *tsp = tmp_ts;
return (0);
}
@@ -288,9 +216,8 @@ __txn_global_query_timestamp(
if (WT_STRING_MATCH("all_committed", cval.str, cval.len)) {
if (!txn_global->has_commit_timestamp)
return (WT_NOTFOUND);
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&ts, &txn_global->commit_timestamp));
- WT_ASSERT(session, !__wt_timestamp_iszero(&ts));
+ ts = txn_global->commit_timestamp;
+ WT_ASSERT(session, ts != 0);
/* Skip the lock if there are no running transactions. */
if (TAILQ_EMPTY(&txn_global->commit_timestamph))
@@ -303,24 +230,22 @@ __txn_global_query_timestamp(
if (txn->clear_commit_q)
continue;
- __wt_timestamp_set(
- &tmpts, &txn->first_commit_timestamp);
- WT_ASSERT(session, !__wt_timestamp_iszero(&tmpts));
- __wt_timestamp_subone(&tmpts);
+ tmpts = txn->first_commit_timestamp;
+ WT_ASSERT(session, tmpts != 0);
+ tmpts -= 1;
- if (__wt_timestamp_cmp(&tmpts, &ts) < 0)
- __wt_timestamp_set(&ts, &tmpts);
+ if (tmpts < ts)
+ ts = tmpts;
break;
}
__wt_readunlock(session, &txn_global->commit_timestamp_rwlock);
} else if (WT_STRING_MATCH("last_checkpoint", cval.str, cval.len))
/* Read-only value forever. No lock needed. */
- __wt_timestamp_set(&ts, &txn_global->last_ckpt_timestamp);
+ ts = txn_global->last_ckpt_timestamp;
else if (WT_STRING_MATCH("oldest", cval.str, cval.len)) {
if (!txn_global->has_oldest_timestamp)
return (WT_NOTFOUND);
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&ts, &txn_global->oldest_timestamp));
+ ts = txn_global->oldest_timestamp;
} else if (WT_STRING_MATCH("oldest_reader", cval.str, cval.len))
WT_RET(__txn_get_pinned_timestamp(
session, &ts, WT_TXN_TS_INCLUDE_CKPT));
@@ -329,17 +254,16 @@ __txn_global_query_timestamp(
WT_TXN_TS_INCLUDE_CKPT | WT_TXN_TS_INCLUDE_OLDEST));
else if (WT_STRING_MATCH("recovery", cval.str, cval.len))
/* Read-only value forever. No lock needed. */
- __wt_timestamp_set(&ts, &txn_global->recovery_timestamp);
+ ts = txn_global->recovery_timestamp;
else if (WT_STRING_MATCH("stable", cval.str, cval.len)) {
if (!txn_global->has_stable_timestamp)
return (WT_NOTFOUND);
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&ts, &txn_global->stable_timestamp));
+ ts = txn_global->stable_timestamp;
} else
WT_RET_MSG(session, EINVAL,
"unknown timestamp query %.*s", (int)cval.len, cval.str);
-done: __wt_timestamp_set(tsp, &ts);
+done: *tsp = ts;
return (0);
}
@@ -362,20 +286,19 @@ __txn_query_timestamp(
WT_RET(__wt_config_gets(session, cfg, "get", &cval));
if (WT_STRING_MATCH("commit", cval.str, cval.len))
- __wt_timestamp_set(tsp, &txn->commit_timestamp);
+ *tsp = txn->commit_timestamp;
else if (WT_STRING_MATCH("first_commit", cval.str, cval.len))
- __wt_timestamp_set(tsp, &txn->first_commit_timestamp);
+ *tsp = txn->first_commit_timestamp;
else if (WT_STRING_MATCH("prepare", cval.str, cval.len))
- __wt_timestamp_set(tsp, &txn->prepare_timestamp);
+ *tsp = txn->prepare_timestamp;
else if (WT_STRING_MATCH("read", cval.str, cval.len))
- __wt_timestamp_set(tsp, &txn->read_timestamp);
+ *tsp = txn->read_timestamp;
else
WT_RET_MSG(session, EINVAL,
"unknown timestamp query %.*s", (int)cval.len, cval.str);
return (0);
}
-#endif
/*
* __wt_txn_query_timestamp --
@@ -386,7 +309,6 @@ int
__wt_txn_query_timestamp(WT_SESSION_IMPL *session,
char *hex_timestamp, const char *cfg[], bool global_txn)
{
-#ifdef HAVE_TIMESTAMPS
wt_timestamp_t ts;
if (global_txn)
@@ -394,18 +316,10 @@ __wt_txn_query_timestamp(WT_SESSION_IMPL *session,
else
WT_RET(__txn_query_timestamp(session, &ts, cfg));
- return (__wt_timestamp_to_hex_string(session, hex_timestamp, &ts));
-#else
- WT_UNUSED(hex_timestamp);
- WT_UNUSED(cfg);
- WT_UNUSED(global_txn);
-
- WT_RET_MSG(session, ENOTSUP,
- "requires a version of WiredTiger built with timestamp support");
-#endif
+ __wt_timestamp_to_hex_string(hex_timestamp, ts);
+ return (0);
}
-#ifdef HAVE_TIMESTAMPS
/*
* __wt_txn_update_pinned_timestamp --
* Update the pinned timestamp (the oldest timestamp that has to be
@@ -430,12 +344,9 @@ __wt_txn_update_pinned_timestamp(WT_SESSION_IMPL *session, bool force)
return (ret == WT_NOTFOUND ? 0 : ret);
if (txn_global->has_pinned_timestamp && !force) {
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(
- &last_pinned_timestamp, &txn_global->pinned_timestamp));
+ last_pinned_timestamp = txn_global->pinned_timestamp;
- if (__wt_timestamp_cmp(
- &pinned_timestamp, &last_pinned_timestamp) <= 0)
+ if (pinned_timestamp <= last_pinned_timestamp)
return (0);
}
@@ -450,25 +361,23 @@ __wt_txn_update_pinned_timestamp(WT_SESSION_IMPL *session, bool force)
return (ret == WT_NOTFOUND ? 0 : ret);
}
- if (!txn_global->has_pinned_timestamp || force || __wt_timestamp_cmp(
- &txn_global->pinned_timestamp, &pinned_timestamp) < 0) {
- __wt_timestamp_set(
- &txn_global->pinned_timestamp, &pinned_timestamp);
+ if (!txn_global->has_pinned_timestamp || force ||
+ txn_global->pinned_timestamp < pinned_timestamp) {
+ txn_global->pinned_timestamp = pinned_timestamp;
txn_global->has_pinned_timestamp = true;
- txn_global->oldest_is_pinned = __wt_timestamp_cmp(
- &txn_global->pinned_timestamp,
- &txn_global->oldest_timestamp) == 0;
- txn_global->stable_is_pinned = __wt_timestamp_cmp(
- &txn_global->pinned_timestamp,
- &txn_global->stable_timestamp) == 0;
+ txn_global->oldest_is_pinned =
+ txn_global->pinned_timestamp ==
+ txn_global->oldest_timestamp;
+ txn_global->stable_is_pinned =
+ txn_global->pinned_timestamp ==
+ txn_global->stable_timestamp;
__wt_verbose_timestamp(session,
- &pinned_timestamp, "Updated pinned timestamp");
+ pinned_timestamp, "Updated pinned timestamp");
}
__wt_writeunlock(session, &txn_global->rwlock);
return (0);
}
-#endif
/*
* __wt_txn_global_set_timestamp --
@@ -478,7 +387,14 @@ int
__wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
{
WT_CONFIG_ITEM commit_cval, oldest_cval, stable_cval;
- bool has_commit, has_oldest, has_stable;
+ WT_CONFIG_ITEM cval;
+ WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t commit_ts, oldest_ts, stable_ts;
+ wt_timestamp_t last_oldest_ts, last_stable_ts;
+ char hex_timestamp[2][WT_TS_HEX_SIZE];
+ bool force, has_commit, has_oldest, has_stable;
+
+ txn_global = &S2C(session)->txn_global;
WT_STAT_CONN_INCR(session, txn_set_ts);
WT_RET(__wt_config_gets_def(session,
@@ -503,17 +419,6 @@ __wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
if (!has_commit && !has_oldest && !has_stable)
return (0);
-#ifdef HAVE_TIMESTAMPS
- {
- WT_CONFIG_ITEM cval;
- WT_TXN_GLOBAL *txn_global;
- wt_timestamp_t commit_ts, oldest_ts, stable_ts;
- wt_timestamp_t last_oldest_ts, last_stable_ts;
- char hex_timestamp[2][2 * WT_TIMESTAMP_SIZE + 1];
- bool force;
-
- txn_global = &S2C(session)->txn_global;
-
/*
* Parsing will initialize the timestamp to zero even if
* it is not configured.
@@ -534,8 +439,8 @@ __wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
__wt_readlock(session, &txn_global->rwlock);
- __wt_timestamp_set(&last_oldest_ts, &txn_global->oldest_timestamp);
- __wt_timestamp_set(&last_stable_ts, &txn_global->stable_timestamp);
+ last_oldest_ts = txn_global->oldest_timestamp;
+ last_stable_ts = txn_global->stable_timestamp;
/*
* First do error checking on the timestamp values. The
@@ -545,35 +450,31 @@ __wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
* setting both then compare the passed in values.
*/
if (!has_commit && txn_global->has_commit_timestamp)
- __wt_timestamp_set(&commit_ts, &txn_global->commit_timestamp);
+ commit_ts = txn_global->commit_timestamp;
if (!has_oldest && txn_global->has_oldest_timestamp)
- __wt_timestamp_set(&oldest_ts, &last_oldest_ts);
+ oldest_ts = last_oldest_ts;
if (!has_stable && txn_global->has_stable_timestamp)
- __wt_timestamp_set(&stable_ts, &last_stable_ts);
+ stable_ts = last_stable_ts;
/*
* If a commit timestamp was supplied, check that it is no older than
* either the stable timestamp or the oldest timestamp.
*/
- if (has_commit && (has_oldest || txn_global->has_oldest_timestamp) &&
- __wt_timestamp_cmp(&oldest_ts, &commit_ts) > 0) {
+ if (has_commit && (has_oldest ||
+ txn_global->has_oldest_timestamp) && oldest_ts > commit_ts) {
__wt_readunlock(session, &txn_global->rwlock);
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &oldest_ts));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[1], &commit_ts));
+ __wt_timestamp_to_hex_string(hex_timestamp[0], oldest_ts);
+ __wt_timestamp_to_hex_string(hex_timestamp[1], commit_ts);
WT_RET_MSG(session, EINVAL,
"set_timestamp: oldest timestamp %s must not be later than "
"commit timestamp %s", hex_timestamp[0], hex_timestamp[1]);
}
- if (has_commit && (has_stable || txn_global->has_stable_timestamp) &&
- __wt_timestamp_cmp(&stable_ts, &commit_ts) > 0) {
+ if (has_commit && (has_stable ||
+ txn_global->has_stable_timestamp) && stable_ts > commit_ts) {
__wt_readunlock(session, &txn_global->rwlock);
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &stable_ts));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[1], &commit_ts));
+ __wt_timestamp_to_hex_string(hex_timestamp[0], stable_ts);
+ __wt_timestamp_to_hex_string(hex_timestamp[1], commit_ts);
WT_RET_MSG(session, EINVAL,
"set_timestamp: stable timestamp %s must not be later than "
"commit timestamp %s", hex_timestamp[0], hex_timestamp[1]);
@@ -585,13 +486,11 @@ __wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
*/
if ((has_oldest || has_stable) &&
(has_oldest || txn_global->has_oldest_timestamp) &&
- (has_stable || txn_global->has_stable_timestamp) &&
- __wt_timestamp_cmp(&oldest_ts, &stable_ts) > 0) {
+ (has_stable ||
+ txn_global->has_stable_timestamp) && oldest_ts > stable_ts) {
__wt_readunlock(session, &txn_global->rwlock);
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[0], &oldest_ts));
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp[1], &stable_ts));
+ __wt_timestamp_to_hex_string(hex_timestamp[0], oldest_ts);
+ __wt_timestamp_to_hex_string(hex_timestamp[1], stable_ts);
WT_RET_MSG(session, EINVAL,
"set_timestamp: oldest timestamp %s must not be later than "
"stable timestamp %s", hex_timestamp[0], hex_timestamp[1]);
@@ -600,12 +499,12 @@ __wt_txn_global_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
__wt_readunlock(session, &txn_global->rwlock);
/* Check if we are actually updating anything. */
- if (has_oldest && txn_global->has_oldest_timestamp &&
- __wt_timestamp_cmp(&oldest_ts, &last_oldest_ts) <= 0)
+ if (has_oldest &&
+ txn_global->has_oldest_timestamp && oldest_ts <= last_oldest_ts)
has_oldest = false;
- if (has_stable && txn_global->has_stable_timestamp &&
- __wt_timestamp_cmp(&stable_ts, &last_stable_ts) <= 0)
+ if (has_stable &&
+ txn_global->has_stable_timestamp && stable_ts <= last_stable_ts)
has_stable = false;
if (!has_commit && !has_oldest && !has_stable)
@@ -623,47 +522,40 @@ set: __wt_writelock(session, &txn_global->rwlock);
* assigned timestamps).
*/
if (has_commit) {
- __wt_timestamp_set(&txn_global->commit_timestamp, &commit_ts);
+ txn_global->commit_timestamp = commit_ts;
txn_global->has_commit_timestamp = true;
WT_STAT_CONN_INCR(session, txn_set_ts_commit_upd);
- __wt_verbose_timestamp(session, &commit_ts,
+ __wt_verbose_timestamp(session, commit_ts,
"Updated global commit timestamp");
}
- if (has_oldest && (!txn_global->has_oldest_timestamp ||
- force || __wt_timestamp_cmp(
- &oldest_ts, &txn_global->oldest_timestamp) > 0)) {
- __wt_timestamp_set(&txn_global->oldest_timestamp, &oldest_ts);
+ if (has_oldest && (!txn_global->has_oldest_timestamp || force ||
+ oldest_ts > txn_global->oldest_timestamp)) {
+ txn_global->oldest_timestamp = oldest_ts;
WT_STAT_CONN_INCR(session, txn_set_ts_oldest_upd);
txn_global->has_oldest_timestamp = true;
txn_global->oldest_is_pinned = false;
- __wt_verbose_timestamp(session, &oldest_ts,
+ __wt_verbose_timestamp(session, oldest_ts,
"Updated global oldest timestamp");
}
- if (has_stable && (!txn_global->has_stable_timestamp ||
- force || __wt_timestamp_cmp(
- &stable_ts, &txn_global->stable_timestamp) > 0)) {
- __wt_timestamp_set(&txn_global->stable_timestamp, &stable_ts);
+ if (has_stable && (!txn_global->has_stable_timestamp || force ||
+ stable_ts > txn_global->stable_timestamp)) {
+ txn_global->stable_timestamp = stable_ts;
WT_STAT_CONN_INCR(session, txn_set_ts_stable_upd);
txn_global->has_stable_timestamp = true;
txn_global->stable_is_pinned = false;
- __wt_verbose_timestamp(session, &stable_ts,
+ __wt_verbose_timestamp(session, stable_ts,
"Updated global stable timestamp");
}
__wt_writeunlock(session, &txn_global->rwlock);
if (has_oldest || has_stable)
WT_RET(__wt_txn_update_pinned_timestamp(session, force));
- }
+
return (0);
-#else
- WT_RET_MSG(session, ENOTSUP, "set_timestamp requires a "
- "version of WiredTiger built with timestamp support");
-#endif
}
-#ifdef HAVE_TIMESTAMPS
/*
* __wt_timestamp_validate --
* Validate a timestamp to be not older than the global oldest and global
@@ -672,39 +564,37 @@ set: __wt_writelock(session, &txn_global->rwlock);
*/
int
__wt_timestamp_validate(WT_SESSION_IMPL *session, const char *name,
- wt_timestamp_t *ts, WT_CONFIG_ITEM *cval)
+ wt_timestamp_t ts, WT_CONFIG_ITEM *cval)
{
WT_TXN *txn = &session->txn;
WT_TXN_GLOBAL *txn_global = &S2C(session)->txn_global;
wt_timestamp_t oldest_ts, stable_ts;
- char hex_timestamp[2 * WT_TIMESTAMP_SIZE + 1];
+ char hex_timestamp[WT_TS_HEX_SIZE];
bool has_oldest_ts, has_stable_ts;
/*
* Added this redundant initialization to circumvent build failure.
*/
- __wt_timestamp_set_zero(&oldest_ts);
- __wt_timestamp_set_zero(&stable_ts);
+ oldest_ts = stable_ts = 0;
/*
* Compare against the oldest and the stable timestamp. Return an error
* if the given timestamp is older than oldest and/or stable timestamp.
*/
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- if ((has_oldest_ts = txn_global->has_oldest_timestamp))
- __wt_timestamp_set(&oldest_ts, &txn_global->oldest_timestamp);
- if ((has_stable_ts = txn_global->has_stable_timestamp))
- __wt_timestamp_set(&stable_ts, &txn_global->stable_timestamp));
-
- if (has_oldest_ts && __wt_timestamp_cmp(ts, &oldest_ts) < 0) {
- WT_RET(__wt_timestamp_to_hex_string(session, hex_timestamp,
- &oldest_ts));
+ has_oldest_ts = txn_global->has_oldest_timestamp;
+ if (has_oldest_ts)
+ oldest_ts = txn_global->oldest_timestamp;
+ has_stable_ts = txn_global->has_stable_timestamp;
+ if (has_stable_ts)
+ stable_ts = txn_global->stable_timestamp;
+
+ if (has_oldest_ts && ts < oldest_ts) {
+ __wt_timestamp_to_hex_string(hex_timestamp, oldest_ts);
WT_RET_MSG(session, EINVAL,
"%s timestamp %.*s older than oldest timestamp %s",
name, (int)cval->len, cval->str, hex_timestamp);
}
- if (has_stable_ts && __wt_timestamp_cmp(ts, &stable_ts) < 0) {
- WT_RET(__wt_timestamp_to_hex_string(session, hex_timestamp,
- &stable_ts));
+ if (has_stable_ts && ts < stable_ts) {
+ __wt_timestamp_to_hex_string(hex_timestamp, stable_ts);
WT_RET_MSG(session, EINVAL,
"%s timestamp %.*s older than stable timestamp %s",
name, (int)cval->len, cval->str, hex_timestamp);
@@ -716,9 +606,9 @@ __wt_timestamp_validate(WT_SESSION_IMPL *session, const char *name,
* commit timestamp.
*/
if (F_ISSET(txn, WT_TXN_HAS_TS_COMMIT) &&
- __wt_timestamp_cmp(ts, &txn->first_commit_timestamp) < 0) {
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp, &txn->first_commit_timestamp));
+ ts < txn->first_commit_timestamp) {
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, txn->first_commit_timestamp);
WT_RET_MSG(session, EINVAL,
"%s timestamp %.*s older than the first "
"commit timestamp %s for this transaction",
@@ -730,10 +620,9 @@ __wt_timestamp_validate(WT_SESSION_IMPL *session, const char *name,
* Return an error if the given timestamp is older than the prepare
* timestamp.
*/
- if (F_ISSET(txn, WT_TXN_PREPARE) &&
- __wt_timestamp_cmp(ts, &txn->prepare_timestamp) < 0) {
- WT_RET(__wt_timestamp_to_hex_string(
- session, hex_timestamp, &txn->prepare_timestamp));
+ if (F_ISSET(txn, WT_TXN_PREPARE) && ts < txn->prepare_timestamp) {
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, txn->prepare_timestamp);
WT_RET_MSG(session, EINVAL,
"%s timestamp %.*s older than the prepare timestamp %s "
"for this transaction",
@@ -742,7 +631,6 @@ __wt_timestamp_validate(WT_SESSION_IMPL *session, const char *name,
return (0);
}
-#endif
/*
* __wt_txn_set_timestamp --
@@ -753,24 +641,20 @@ __wt_txn_set_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
{
WT_CONFIG_ITEM cval;
WT_DECL_RET;
+ WT_TXN *txn;
+ wt_timestamp_t ts;
+
+ txn = &session->txn;
/* Look for a commit timestamp. */
ret = __wt_config_gets_def(session, cfg, "commit_timestamp", 0, &cval);
WT_RET_NOTFOUND_OK(ret);
if (ret == 0 && cval.len != 0) {
-#ifdef HAVE_TIMESTAMPS
- WT_TXN *txn = &session->txn;
- wt_timestamp_t ts;
-
WT_TRET(__wt_txn_context_check(session, true));
WT_RET(__wt_txn_parse_timestamp(session, "commit", &ts, &cval));
- WT_RET(__wt_timestamp_validate(session, "commit", &ts, &cval));
- __wt_timestamp_set(&txn->commit_timestamp, &ts);
+ WT_RET(__wt_timestamp_validate(session, "commit", ts, &cval));
+ txn->commit_timestamp = ts;
__wt_txn_set_commit_timestamp(session);
-#else
- WT_RET_MSG(session, ENOTSUP, "commit_timestamp requires a "
- "version of WiredTiger built with timestamp support");
-#endif
} else
/*
* We allow setting the commit timestamp after a prepare
@@ -793,18 +677,16 @@ __wt_txn_parse_prepare_timestamp(
WT_SESSION_IMPL *session, const char *cfg[], wt_timestamp_t *timestamp)
{
WT_CONFIG_ITEM cval;
+ WT_TXN *prev;
+ WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t oldest_ts;
+ char hex_timestamp[WT_TS_HEX_SIZE];
+
+ txn_global = &S2C(session)->txn_global;
WT_RET(__wt_config_gets_def(session,
cfg, "prepare_timestamp", 0, &cval));
if (cval.len > 0) {
-#ifdef HAVE_TIMESTAMPS
- WT_TXN *prev;
- WT_TXN_GLOBAL *txn_global;
- wt_timestamp_t oldest_ts;
- char hex_timestamp[2 * WT_TIMESTAMP_SIZE + 1];
-
- txn_global = &S2C(session)->txn_global;
-
if (F_ISSET(&session->txn, WT_TXN_HAS_TS_COMMIT))
WT_RET_MSG(session, EINVAL,
"commit timestamp should not have been set before "
@@ -829,12 +711,11 @@ __wt_txn_parse_prepare_timestamp(
prev, __wt_txn_rts_qh, read_timestampq);
continue;
}
- if (__wt_timestamp_cmp(
- &prev->read_timestamp, timestamp) >= 0) {
+ if (prev->read_timestamp >= *timestamp) {
__wt_readunlock(session,
&txn_global->read_timestamp_rwlock);
- WT_RET(__wt_timestamp_to_hex_string(session,
- hex_timestamp, &prev->read_timestamp));
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, prev->read_timestamp);
WT_RET_MSG(session, EINVAL,
"prepare timestamp %.*s not later than "
"an active read timestamp %s ",
@@ -849,24 +730,17 @@ __wt_txn_parse_prepare_timestamp(
* be older than oldest timestamp.
*/
if (prev == NULL) {
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&oldest_ts,
- &txn_global->oldest_timestamp));
+ oldest_ts = txn_global->oldest_timestamp;
- if (__wt_timestamp_cmp(timestamp, &oldest_ts) < 0) {
- WT_RET(__wt_timestamp_to_hex_string(session,
- hex_timestamp, &oldest_ts));
+ if (*timestamp < oldest_ts) {
+ __wt_timestamp_to_hex_string(
+ hex_timestamp, oldest_ts);
WT_RET_MSG(session, EINVAL,
"prepare timestamp %.*s is older than the "
"oldest timestamp %s ", (int)cval.len,
cval.str, hex_timestamp);
}
}
-#else
- WT_UNUSED(timestamp);
- WT_RET_MSG(session, EINVAL, "prepare_timestamp requires a "
- "version of WiredTiger built with timestamp support");
-#endif
} else
WT_RET_MSG(session, EINVAL, "prepare timestamp is required");
@@ -881,17 +755,15 @@ __wt_txn_parse_read_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
{
WT_CONFIG_ITEM cval;
WT_TXN *txn;
+ WT_TXN_GLOBAL *txn_global;
+ wt_timestamp_t ts;
+ char hex_timestamp[2][WT_TS_HEX_SIZE];
+ bool round_to_oldest;
txn = &session->txn;
WT_RET(__wt_config_gets_def(session, cfg, "read_timestamp", 0, &cval));
if (cval.len > 0) {
-#ifdef HAVE_TIMESTAMPS
- wt_timestamp_t ts;
- WT_TXN_GLOBAL *txn_global;
- char hex_timestamp[2][2 * WT_TIMESTAMP_SIZE + 1];
- bool round_to_oldest;
-
txn_global = &S2C(session)->txn_global;
WT_RET(__wt_txn_parse_timestamp(session, "read", &ts, &cval));
@@ -920,21 +792,19 @@ __wt_txn_parse_read_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
* avoid a race between checking and setting transaction
* timestamp.
*/
- WT_RET(__wt_timestamp_to_hex_string(session,
- hex_timestamp[0], &ts));
+ __wt_timestamp_to_hex_string(hex_timestamp[0], ts);
__wt_readlock(session, &txn_global->rwlock);
- if (__wt_timestamp_cmp(
- &ts, &txn_global->oldest_timestamp) < 0) {
- WT_RET(__wt_timestamp_to_hex_string(session,
- hex_timestamp[1], &txn_global->oldest_timestamp));
+ if (ts < txn_global->oldest_timestamp) {
+ __wt_timestamp_to_hex_string(
+ hex_timestamp[1], txn_global->oldest_timestamp);
/*
* If given read timestamp is earlier than oldest
* timestamp then round the read timestamp to
* oldest timestamp.
*/
if (round_to_oldest)
- __wt_timestamp_set(&txn->read_timestamp,
- &txn_global->oldest_timestamp);
+ txn->read_timestamp =
+ txn_global->oldest_timestamp;
else {
__wt_readunlock(session, &txn_global->rwlock);
WT_RET_MSG(session, EINVAL, "read timestamp "
@@ -942,7 +812,7 @@ __wt_txn_parse_read_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
hex_timestamp[0], hex_timestamp[1]);
}
} else {
- __wt_timestamp_set(&txn->read_timestamp, &ts);
+ txn->read_timestamp = ts;
/*
* Reset to avoid a verbose message as read
* timestamp is not rounded to oldest timestamp.
@@ -969,18 +839,11 @@ __wt_txn_parse_read_timestamp(WT_SESSION_IMPL *session, const char *cfg[])
*/
if (F_ISSET(txn, WT_TXN_RUNNING))
__wt_txn_get_snapshot(session);
-
-#else
- WT_UNUSED(txn);
- WT_RET_MSG(session, EINVAL, "read_timestamp requires a "
- "version of WiredTiger built with timestamp support");
-#endif
}
return (0);
}
-#ifdef HAVE_TIMESTAMPS
/*
* __wt_txn_set_commit_timestamp --
* Publish a transaction's commit timestamp.
@@ -1004,7 +867,7 @@ __wt_txn_set_commit_timestamp(WT_SESSION_IMPL *session)
* transaction is running) into the first_commit_timestamp, which is
* fixed.
*/
- __wt_timestamp_set(&ts, &txn->commit_timestamp);
+ ts = txn->commit_timestamp;
__wt_writelock(session, &txn_global->commit_timestamp_rwlock);
/*
@@ -1052,8 +915,7 @@ __wt_txn_set_commit_timestamp(WT_SESSION_IMPL *session)
*/
qtxn = TAILQ_LAST(
&txn_global->commit_timestamph, __wt_txn_cts_qh);
- while (qtxn != NULL && __wt_timestamp_cmp(
- &qtxn->first_commit_timestamp, &ts) > 0) {
+ while (qtxn != NULL && qtxn->first_commit_timestamp > ts) {
++walked;
qtxn = TAILQ_PREV(
qtxn, __wt_txn_cts_qh, commit_timestampq);
@@ -1067,7 +929,7 @@ __wt_txn_set_commit_timestamp(WT_SESSION_IMPL *session)
qtxn, txn, commit_timestampq);
WT_STAT_CONN_INCRV(session, txn_commit_queue_walked, walked);
}
- __wt_timestamp_set(&txn->first_commit_timestamp, &ts);
+ txn->first_commit_timestamp = ts;
++txn_global->commit_timestampq_len;
WT_STAT_CONN_INCR(session, txn_commit_queue_inserts);
txn->clear_commit_q = false;
@@ -1162,8 +1024,7 @@ __wt_txn_set_read_timestamp(WT_SESSION_IMPL *session)
qtxn = TAILQ_LAST(
&txn_global->read_timestamph, __wt_txn_rts_qh);
while (qtxn != NULL &&
- __wt_timestamp_cmp(&qtxn->read_timestamp,
- &txn->read_timestamp) > 0) {
+ qtxn->read_timestamp > txn->read_timestamp) {
++walked;
qtxn = TAILQ_PREV(
qtxn, __wt_txn_rts_qh, read_timestampq);
@@ -1209,10 +1070,8 @@ __wt_txn_clear_read_timestamp(WT_SESSION_IMPL *session)
wt_timestamp_t pinned_ts;
txn_global = &S2C(session)->txn_global;
- WT_WITH_TIMESTAMP_READLOCK(session, &txn_global->rwlock,
- __wt_timestamp_set(&pinned_ts, &txn_global->pinned_timestamp));
- WT_ASSERT(session,
- __wt_timestamp_cmp(&txn->read_timestamp, &pinned_ts) >= 0);
+ pinned_ts = txn_global->pinned_timestamp;
+ WT_ASSERT(session, txn->read_timestamp >= pinned_ts);
}
#endif
flags = txn->flags;
@@ -1226,7 +1085,6 @@ __wt_txn_clear_read_timestamp(WT_SESSION_IMPL *session)
WT_PUBLISH(txn->clear_read_q, true);
WT_PUBLISH(txn->flags, flags);
}
-#endif
/*
* __wt_txn_clear_timestamp_queues --
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 14cdf9d9016..63e457fe705 100644
--- a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c
@@ -911,19 +911,6 @@ run_workload(uint32_t nth)
exit(EXIT_SUCCESS);
}
-/*
- * Determines whether this is a timestamp build or not
- */
-static bool
-timestamp_build(void)
-{
-#ifdef HAVE_TIMESTAMPS
- return (true);
-#else
- return (false);
-#endif
-}
-
extern int __wt_optind;
extern char *__wt_optarg;
@@ -996,10 +983,6 @@ main(int argc, char *argv[])
const char *working_dir;
bool fatal, rand_th, rand_time, verify_only;
- /* We have nothing to do if this is not a timestamp build */
- if (!timestamp_build())
- return (EXIT_SUCCESS);
-
(void)testutil_set_progname(argv);
compat = inmem = false;
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 1989f8457c8..837b3f400b2 100644
--- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
+++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c
@@ -127,7 +127,7 @@ thread_ts_run(void *arg)
WT_DECL_RET;
WT_SESSION *session;
THREAD_DATA *td;
- char tscfg[64], ts_buf[WT_TIMESTAMP_SIZE];
+ char tscfg[64], ts_buf[WT_TS_HEX_SIZE];
td = (THREAD_DATA *)arg;
@@ -490,19 +490,6 @@ run_workload(uint32_t nth)
exit(EXIT_SUCCESS);
}
-/*
- * Determines whether this is a timestamp build or not
- */
-static bool
-timestamp_build(void)
-{
-#ifdef HAVE_TIMESTAMPS
- return (true);
-#else
- return (false);
-#endif
-}
-
extern int __wt_optind;
extern char *__wt_optarg;
@@ -573,10 +560,6 @@ main(int argc, char *argv[])
char buf[512], fname[64], kname[64], statname[1024];
bool fatal, rand_th, rand_time, verify_only;
- /* We have nothing to do if this is not a timestamp build */
- if (!timestamp_build())
- return (EXIT_SUCCESS);
-
(void)testutil_set_progname(argv);
compat = inmem = false;
diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml
new file mode 100644
index 00000000000..481fccddba9
--- /dev/null
+++ b/src/third_party/wiredtiger/test/evergreen.yml
@@ -0,0 +1,925 @@
+#
+# This file defines the tasks and platforms for WiredTiger in the
+# MongoDB continuous integration system (see https://mci.mongodb.com).
+#
+
+functions:
+ "fetch source" :
+ command: git.get_project
+ params:
+ directory: wiredtiger
+ "fetch artifacts" :
+ - command: s3.get
+ params:
+ aws_key: ${aws_key}
+ aws_secret: ${aws_secret}
+ remote_file: wiredtiger/${build_variant}/${revision}/artifacts/${build_id}.tgz
+ bucket: build_external
+ extract_to: wiredtiger
+ "fetch mongo-tests repo" :
+ command: shell.exec
+ params:
+ script: |
+ git clone https://github.com/wiredtiger/mongo-tests
+ "compile wiredtiger":
+ command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ shell: bash
+ script: |
+ set -o errexit
+ set -o verbose
+ if [ "Windows_NT" = "$OS" ]; then
+ scons.bat --enable-python=c:\\swigwin-3.0.2\\swig.exe --enable-diagnostic ${smp_command|}
+ else
+ ./build_posix/reconf
+ ${configure_env_vars|} ./configure --enable-diagnostic --enable-python --enable-zlib --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
+ ${make_command|make} ${smp_command|} 2>&1
+
+ # On macOS, change the binary location with install_name_tool since DYLD_LIBRARY_PATH
+ # appears not to work for dynamic modules loaded by python. For wt, the libtool generated
+ # script has the wrong path for running on test machines.
+ if [ "$(uname -s)" == "Darwin" ]; then
+ WT_VERSION=$(m4 build_posix/aclocal/version.m4)
+ install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib lang/python/_wiredtiger*.so
+ install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib .libs/wt
+ fi
+ fi
+
+pre:
+ - command: shell.exec
+ params:
+ script: |
+ rm -rf "wiredtiger"
+post:
+ - command: archive.targz_pack
+ params:
+ target: "wiredtiger.tgz"
+ source_dir: "wiredtiger"
+ include:
+ - "./**"
+ - command: s3.put
+ params:
+ aws_secret: ${aws_secret}
+ aws_key: ${aws_key}
+ local_file: wiredtiger.tgz
+ bucket: build_external
+ permissions: public-read
+ content_type: application/tar
+ display_name: Artifacts
+ remote_file: wiredtiger/${build_variant}/${revision}/artifacts/${build_id}.tgz
+ - command: shell.exec
+ params:
+ script: |
+ rm -rf "wiredtiger"
+
+tasks:
+## Base compile task on posix flavours
+ - name: compile
+ depends_on: []
+ commands:
+ - func: "fetch source"
+ - command: git.apply_patch
+ params:
+ directory: wiredtiger
+ - func: "compile wiredtiger"
+
+ - name: make-check-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 ${make_command|make} VERBOSE=1 check ${smp_command|} 2>&1
+
+ # Start of normal make check test tasks
+
+ - name: lang-python-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C lang/python ${smp_command|} 2>&1
+
+ - name: examples-c-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C examples/c ${smp_command|} 2>&1
+
+ - name: bloom-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/bloom ${smp_command|} 2>&1
+
+ - name: checkpoint-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/checkpoint ${smp_command|} 2>&1
+
+ - name: cursor-order-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/cursor_order ${smp_command|} 2>&1
+
+ - name: fops-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/fops ${smp_command|} 2>&1
+
+ - name: format-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/format ${smp_command|} 2>&1
+
+ - name: huge-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/huge ${smp_command|} 2>&1
+
+ - name: manydbs-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/manydbs ${smp_command|} 2>&1
+
+ - name: packing-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/packing ${smp_command|} 2>&1
+
+ - name: readonly-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/readonly ${smp_command|} 2>&1
+
+ - name: salvage-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/salvage ${smp_command|} 2>&1
+
+ - name: thread-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C test/thread ${smp_command|} 2>&1
+
+ - name: bench-wtperf-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "compile wiredtiger"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C bench/wtperf ${smp_command|} 2>&1
+
+ # End of normal make check test tasks
+
+ # Start of csuite test tasks
+
+ - name: csuite-random-abort-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/random_abort/smoke.sh 2>&1
+
+ - name: csuite-random-directio-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/random_directio/smoke.sh 2>&1
+
+ - name: csuite-schema-abort-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/schema_abort/smoke.sh 2>&1
+
+ - name: csuite-timestamp-abort-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/timestamp_abort/smoke.sh 2>&1
+
+ - name: csuite-scope-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_scope 2>&1
+
+ - name: csuite-truncated-log-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_truncated_log 2>&1
+
+ - name: csuite-wt1965-col-efficiency-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt1965_col_efficiency 2>&1
+
+ - name: csuite-wt2403-lsm-workload-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt2403_lsm_workload 2>&1
+
+ - name: csuite-wt2447-join-main-table-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt2447_join_main_table 2>&1
+
+ - name: csuite-wt2695-checksum-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt2695_checksum 2>&1
+
+ - name: csuite-wt2592-join-schema-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt2592_join_schema 2>&1
+
+ - name: csuite-wt2719-reconfig-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt2719_reconfig 2>&1
+
+ - name: csuite-wt2999-join-extractor-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt2999_join_extractor 2>&1
+
+ - name: csuite-wt3120-filesys-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt3120_filesys 2>&1
+
+ - name: csuite-wt3135-search-near-collator-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt3135_search_near_collator 2>&1
+
+ - name: csuite-wt3184-dup-index-collator-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt3184_dup_index_collator 2>&1
+
+ - name: csuite-wt3363-checkpoint-op-races-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt3363_checkpoint_op_races 2>&1
+
+ - name: csuite-wt3874-pad-byte-collator-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt3874_pad_byte_collator 2>&1
+
+ - name: csuite-wt4105-large-doc-small-upd-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt4105_large_doc_small_upd 2>&1
+
+ - name: csuite-wt4117-checksum-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt4117_checksum 2>&1
+
+ - name: csuite-wt4156-metadata-salvage-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} $(pwd)/test_wt4156_metadata_salvage 2>&1
+
+ - name: csuite-rwlock-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_rwlock 2>&1
+
+ - name: csuite-wt2246-col-append-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt2246_col_append 2>&1
+
+ - name: csuite-wt2323-join-visibility-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt2323_join_visibility 2>&1
+
+ - name: csuite-wt2535-insert-race-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt2535_insert_race 2>&1
+
+ - name: csuite-wt2834-join-bloom-fix-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt2834_join_bloom_fix 2>&1
+
+ - name: csuite-wt2853-perf-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt2853_perf 2>&1
+
+ - name: csuite-wt2909-checkpoint-integrity-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt2909_checkpoint_integrity 2>&1
+
+ - name: csuite-wt3338-partial-update-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt3338_partial_update 2>&1
+
+ - name: csuite-wt4333-handle-locks-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger/test/csuite"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 $(pwd)/test_wt4333_handle_locks 2>&1
+
+ # End of csuite test tasks
+
+ - name: unit-test
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ if [ "Windows_NT" = "$OS" ]; then
+ ${test_env_vars|} python ./test/suite/run.py -v 2 ${smp_command|} 2>&1
+ elif [ "$(uname -s)" == "Darwin" ]; then
+ # Avoid /usr/bin/python, at least on macOS: with System Integrity
+ # Protection enabled, it ignores DYLD_LIBRARY_PATH and hence
+ # doesn't find the WiredTiger library in the local tree.
+ ${test_env_vars|} python ./test/suite/run.py -v 2 ${smp_command|} 2>&1
+ else # Ubuntu
+ # Change directory to where the local installed 'wt' binary is located,
+ # to avoid libtool generated 'wt' script from being selected by run.py,
+ # which invokes relink_command that tries to changing to a non-existed
+ # /data/mci/<uniq> directory, as 'make' is done by a separate 'compile' task.
+ cd .libs
+ ${python_test_env_vars|} python ../test/suite/run.py -v 2 ${smp_command|} 2>&1
+ fi
+
+ - name: compile-windows-alt
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+
+ scons.bat ${smp_command|} "CFLAGS=/Gv /wd4090 /wd4996 /we4047 /we4024 /TC /we4100 /we4133" wiredtiger.dll libwiredtiger.lib
+
+ - name: fops
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+ if [ "Windows_NT" = "$OS" ]; then
+ cmd.exe /c t_fops.exe
+ else
+ ./test/fops/t
+ fi
+
+ - name: format
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - command: shell.exec
+ params:
+ working_dir: "wiredtiger"
+ script: |
+ set -o errexit
+ set -o verbose
+ # format assumes we run it from the format directory
+ cmd.exe /c "cd test\\format && ..\\..\\t_format.exe reverse=0 encryption=none logging_compression=none runs=20"
+
+ - name: million-collection-test
+ depends_on: []
+ run_on:
+ - rhel62-large
+ commands:
+ - func: "fetch mongo-tests repo"
+ - command: shell.exec
+ params:
+ working_dir: mongo-tests
+ script: |
+ set -o errexit
+ set -o verbose
+ ulimit -n 1000000
+ ulimit -c unlimited
+ largescale/run-million-collection-test.sh .
+
+buildvariants:
+- name: ubuntu1404
+ display_name: Ubuntu 14.04
+ run_on:
+ - ubuntu1404-test
+ expansions:
+ # It's ugly, but we need the absolute path here, not the relative
+ test_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs
+ # Python (unit) test is executed under the .libs directory, where wiredtiger shared library files locate
+ python_test_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH LD_LIBRARY_PATH=$(pwd)
+ smp_command: -j $(grep -c ^processor /proc/cpuinfo)
+ configure_env_vars: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ PATH=/opt/mongodbtoolchain/v2/bin:$PATH
+ tasks:
+ - name: compile
+ - name: lang-python-test
+ - name: examples-c-test
+ - name: bloom-test
+ - name: checkpoint-test
+ - name: cursor-order-test
+ - name: fops-test
+ - name: format-test
+ - name: huge-test
+ - name: manydbs-test
+ - name: packing-test
+ - name: readonly-test
+ - name: salvage-test
+ - name: thread-test
+ - name: bench-wtperf-test
+ - name: csuite-random-abort-test
+ - name: csuite-random-directio-test
+ - name: csuite-schema-abort-test
+ - name: csuite-timestamp-abort-test
+ - name: csuite-scope-test
+ - name: csuite-truncated-log-test
+ - name: csuite-wt1965-col-efficiency-test
+ - name: csuite-wt2403-lsm-workload-test
+ - name: csuite-wt2447-join-main-table-test
+ - name: csuite-wt2695-checksum-test
+ - name: csuite-wt2592-join-schema-test
+ - name: csuite-wt2719-reconfig-test
+ - name: csuite-wt2999-join-extractor-test
+ - name: csuite-wt3120-filesys-test
+ - name: csuite-wt3135-search-near-collator-test
+ - name: csuite-wt3184-dup-index-collator-test
+ - name: csuite-wt3363-checkpoint-op-races-test
+ - name: csuite-wt3874-pad-byte-collator-test
+ - name: csuite-wt4105-large-doc-small-upd-test
+ - name: csuite-wt4117-checksum-test
+ - name: csuite-wt4156-metadata-salvage-test
+ - name: csuite-rwlock-test
+ - name: csuite-wt2246-col-append-test
+ - name: csuite-wt2323-join-visibility-test
+ - name: csuite-wt2535-insert-race-test
+ - name: csuite-wt2834-join-bloom-fix-test
+ - name: csuite-wt2853-perf-test
+ - name: csuite-wt2909-checkpoint-integrity-test
+ - name: csuite-wt3338-partial-update-test
+ - name: csuite-wt4333-handle-locks-test
+ - name: unit-test
+ - name: fops
+
+- name: large-scale-test
+ display_name: Large scale testing
+ batchtime: 1440 # 1 day
+ run_on:
+ - rhel62-large
+ expansions:
+ configure_env_vars: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
+ tasks:
+ - name: million-collection-test
+
+- name: windows-64
+ display_name: Windows 64-bit
+ run_on:
+ - windows-64-vs2013-test
+ tasks:
+ - name: compile
+ - name: compile-windows-alt
+ - name: unit-test
+ #- name: format - Enable when we have a solution for hangs and crashses
+ - name: fops
+
+- name: macos-1012
+ display_name: OS X 10.12
+ run_on:
+ - macos-1012
+ expansions:
+ smp_command: -j $(sysctl -n hw.logicalcpu)
+ configure_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH
+ make_command: PATH=/opt/mongodbtoolchain/v2/bin:$PATH ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future make
+ test_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH DYLD_LIBRARY_PATH=$(pwd)/.libs
+ tasks:
+ - name: compile
+ - name: make-check-test
+ - name: unit-test
+ - name: fops
+
diff --git a/src/third_party/wiredtiger/test/mciproject.yml b/src/third_party/wiredtiger/test/mciproject.yml
deleted file mode 100644
index 9c8cf2da331..00000000000
--- a/src/third_party/wiredtiger/test/mciproject.yml
+++ /dev/null
@@ -1,229 +0,0 @@
-#
-# This file defines the tasks and platforms for WiredTiger in the
-# MongoDB continuous integration system (see https://mci.mongodb.com).
-#
-
-functions:
- "fetch source" :
- command: git.get_project
- params:
- directory: wiredtiger
- "fetch binaries" : &fetch_binaries
- - command: s3.get
- params:
- aws_key: ${aws_key}
- aws_secret: ${aws_secret}
- remote_file: wiredtiger/${build_variant}/${revision}/binaries/${build_id}.tgz
- bucket: build_external
- extract_to: wiredtiger
- "fetch mongo-tests repo" :
- command: shell.exec
- params:
- script: |
- git clone https://github.com/wiredtiger/mongo-tests
-
-pre:
- - command: shell.exec
- params:
- script: |
- rm -rf "wiredtiger"
-post:
- - command: archive.targz_pack
- params:
- target: "wiredtiger.tgz"
- source_dir: "wiredtiger"
- include:
- - "./**"
- - command: s3.put
- params:
- aws_secret: ${aws_secret}
- aws_key: ${aws_key}
- local_file: wiredtiger.tgz
- bucket: build_external
- permissions: public-read
- content_type: application/tar
- display_name: Artifacts
- remote_file: wiredtiger/${build_variant}/${revision}/artifacts/${build_id}.tgz
- - command: shell.exec
- params:
- script: |
- rm -rf "wiredtiger"
-
-tasks:
-## Base compile task on posix flavours
- - name: compile
- depends_on: []
- commands:
- - func: "fetch source"
- - command: git.apply_patch
- params:
- directory: wiredtiger
- - command: shell.exec
- params:
- working_dir: "wiredtiger"
- script: |
- set -o errexit
- set -o verbose
- if [ "Windows_NT" = "$OS" ]; then
- scons.bat --enable-python=c:\\swigwin-3.0.2\\swig.exe --enable-diagnostic ${smp_command|}
- else
- ./build_posix/reconf
- ${configure_env_vars|} ./configure --enable-diagnostic --enable-python --enable-zlib --enable-strict
- ${make_command|make} ${smp_command|} 2>&1
-
- # On macOS, change the binary location with install_name_tool since DYLD_LIBRARY_PATH
- # appears not to work for dynamic modules loaded by python. For wt, the libtool generated
- # script has the wrong path for running on test machines.
- if [ "$(uname -s)" == "Darwin" ]; then
- WT_VERSION=$(m4 build_posix/aclocal/version.m4)
- install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib lang/python/_wiredtiger*.so
- install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib .libs/wt
- fi
-
- ${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 ${make_command|make} VERBOSE=1 check 2>&1
- fi
- - command: archive.targz_pack
- params:
- target: "wiredtiger.tgz"
- source_dir: "wiredtiger"
- include:
- - "./**"
- - command: s3.put
- params:
- aws_secret: ${aws_secret}
- aws_key: ${aws_key}
- local_file: wiredtiger.tgz
- bucket: build_external
- permissions: public-read
- content_type: application/tar
- display_name: Binaries
- remote_file: wiredtiger/${build_variant}/${revision}/binaries/${build_id}.tgz
-
- - name: unit-test
- depends_on:
- - name: compile
- commands:
- - func: "fetch binaries"
- - command: shell.exec
- params:
- working_dir: "wiredtiger"
- script: |
- set -o errexit
- set -o verbose
-
- # Avoid /usr/bin/python, at least on macOS: with System Integrity
- # Protection enabled, it ignores DYLD_LIBRARY_PATH and hence
- # doesn't find the WiredTiger library in the local tree.
- ${test_env_vars|} python ./test/suite/run.py -v 2 ${smp_command|} 2>&1
-
- - name: compile-windows-alt
- depends_on:
- - name: compile
- commands:
- - func: "fetch binaries"
- - command: shell.exec
- params:
- working_dir: "wiredtiger"
- script: |
- set -o errexit
- set -o verbose
-
- scons.bat ${smp_command|} "CFLAGS=/Gv /wd4090 /wd4996 /we4047 /we4024 /TC /we4100 /we4133" wiredtiger.dll libwiredtiger.lib
-
- - name: fops
- depends_on:
- - name: compile
- commands:
- - func: "fetch binaries"
- - command: shell.exec
- params:
- working_dir: "wiredtiger"
- script: |
- set -o errexit
- set -o verbose
- if [ "Windows_NT" = "$OS" ]; then
- cmd.exe /c t_fops.exe
- else
- ./test/fops/t
- fi
-
- - name: format
- depends_on:
- - name: compile
- commands:
- - func: "fetch binaries"
- - command: shell.exec
- params:
- working_dir: "wiredtiger"
- script: |
- set -o errexit
- set -o verbose
- # format assumes we run it from the format directory
- cmd.exe /c "cd test\\format && ..\\..\\t_format.exe reverse=0 encryption=none logging_compression=none runs=20"
-
- - name: million-collection-test
- depends_on: []
- run_on:
- - rhel62-large
- commands:
- - func: "fetch mongo-tests repo"
- - command: shell.exec
- params:
- working_dir: mongo-tests
- script: |
- set -o errexit
- set -o verbose
- ulimit -n 1000000
- ulimit -c unlimited
- largescale/run-million-collection-test.sh .
-
-buildvariants:
-- name: ubuntu1404
- display_name: Ubuntu 14.04
- run_on:
- - ubuntu1404-test
- expansions:
- # It's ugly, but we need the absolute path here, not the relative
- test_env_vars: LD_LIBRARY_PATH=`pwd`/.libs
- smp_command: -j $(grep -c ^processor /proc/cpuinfo)
- configure_env_vars: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
- tasks:
- - name: compile
- - name: unit-test
- - name: fops
-
-- name: large-scale-test
- display_name: Large scale testing
- batchtime: 1440 # 1 day
- run_on:
- - rhel62-large
- expansions:
- configure_env_vars: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
- tasks:
- - name: million-collection-test
-
-- name: windows-64
- display_name: Windows 64-bit
- run_on:
- - windows-64-vs2013-test
- tasks:
- - name: compile
- - name: compile-windows-alt
- - name: unit-test
- #- name: format - Enable when we have a solution for hangs and crashses
- - name: fops
-
-- name: macos-1012
- display_name: OS X 10.12
- run_on:
- - macos-1012
- expansions:
- smp_command: -j $(sysctl -n hw.logicalcpu)
- configure_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH
- make_command: PATH=/opt/mongodbtoolchain/v2/bin:$PATH ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future make
- test_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH DYLD_LIBRARY_PATH=`pwd`/.libs
- tasks:
- - name: compile
- - name: unit-test
- - name: fops
-
diff --git a/src/third_party/wiredtiger/test/suite/test_assert01.py b/src/third_party/wiredtiger/test/suite/test_assert01.py
index acdb3d9ee69..d603868b9f2 100644
--- a/src/third_party/wiredtiger/test/suite/test_assert01.py
+++ b/src/third_party/wiredtiger/test/suite/test_assert01.py
@@ -93,10 +93,8 @@ class test_assert01(wttest.WiredTigerTestCase, suite_subprocess):
c.close()
def test_commit_timestamp(self):
- #if not wiredtiger.timestamp_build() or not wiredtiger.diagnostic_build():
- # self.skipTest('requires a timestamp and diagnostic build')
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
+ #if not wiredtiger.diagnostic_build():
+ # self.skipTest('requires a diagnostic build')
# Create a data item at a timestamp
self.session.create(self.uri_always, self.cfg + self.cfg_always)
diff --git a/src/third_party/wiredtiger/test/suite/test_assert02.py b/src/third_party/wiredtiger/test/suite/test_assert02.py
index ff1a4bd05e5..175b1460840 100644
--- a/src/third_party/wiredtiger/test/suite/test_assert02.py
+++ b/src/third_party/wiredtiger/test/suite/test_assert02.py
@@ -38,10 +38,8 @@ def timestamp_str(t):
class test_assert02(wttest.WiredTigerTestCase, suite_subprocess):
def test_read_timestamp(self):
- #if not wiredtiger.timestamp_build() or not wiredtiger.diagnostic_build():
- # self.skipTest('requires a timestamp and diagnostic build')
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
+ #if not wiredtiger.diagnostic_build():
+ # self.skipTest('requires a diagnostic build')
base = 'assert02.'
base_uri = 'file:' + base
diff --git a/src/third_party/wiredtiger/test/suite/test_assert03.py b/src/third_party/wiredtiger/test/suite/test_assert03.py
index c78991aba33..21f50e1e64d 100644
--- a/src/third_party/wiredtiger/test/suite/test_assert03.py
+++ b/src/third_party/wiredtiger/test/suite/test_assert03.py
@@ -42,11 +42,8 @@ class test_assert03(wttest.WiredTigerTestCase, suite_subprocess):
none = 'assert=(commit_timestamp=none)'
def test_assert03(self):
-
- #if not wiredtiger.timestamp_build() or not wiredtiger.diagnostic_build():
- # self.skipTest('requires a timestamp and diagnostic build')
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
+ #if not wiredtiger.diagnostic_build():
+ # self.skipTest('requires a diagnostic build')
# Create a data item at the default setting
self.session.create(self.base_uri, self.cfg)
diff --git a/src/third_party/wiredtiger/test/suite/test_assert04.py b/src/third_party/wiredtiger/test/suite/test_assert04.py
index 520a7a6a16d..9852b700fb1 100644
--- a/src/third_party/wiredtiger/test/suite/test_assert04.py
+++ b/src/third_party/wiredtiger/test/suite/test_assert04.py
@@ -38,9 +38,6 @@ def timestamp_str(t):
class test_assert04(wttest.WiredTigerTestCase, suite_subprocess):
def test_timestamp_alter(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
base = 'assert04'
uri = 'file:' + base
cfg_on = 'assert=(commit_timestamp=key_consistent)'
@@ -168,9 +165,6 @@ class test_assert04(wttest.WiredTigerTestCase, suite_subprocess):
c.close()
def test_timestamp_usage(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
base = 'assert04'
uri = 'file:' + base
msg_ooo='/out of order/'
diff --git a/src/third_party/wiredtiger/test/suite/test_backup08.py b/src/third_party/wiredtiger/test/suite/test_backup08.py
index 145a36c5a58..ec0a841c234 100644
--- a/src/third_party/wiredtiger/test/suite/test_backup08.py
+++ b/src/third_party/wiredtiger/test/suite/test_backup08.py
@@ -125,9 +125,6 @@ class test_backup08(wttest.WiredTigerTestCase):
self.assertTimestampsEqual(q, timestamp_str(expected_rec_ts))
def test_timestamp_backup(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Add some data and checkpoint using the timestamp or not
# depending on the configuration. Get the expected timestamp
# where the data is checkpointed for the backup.
diff --git a/src/third_party/wiredtiger/test/suite/test_bug019.py b/src/third_party/wiredtiger/test/suite/test_bug019.py
index 0ef80f3536d..c25afa692cb 100644
--- a/src/third_party/wiredtiger/test/suite/test_bug019.py
+++ b/src/third_party/wiredtiger/test/suite/test_bug019.py
@@ -28,24 +28,36 @@
import fnmatch, os, time
import wiredtiger, wttest
+from wiredtiger import stat
from wtdataset import SimpleDataSet
# test_bug019.py
# Test that pre-allocating log files only pre-allocates a small number.
class test_bug019(wttest.WiredTigerTestCase):
- conn_config = 'log=(enabled,file_max=100K)'
+ conn_config = 'log=(enabled,file_max=100K),statistics=(fast)'
uri = "table:bug019"
entries = 5000
+ max_prealloc = 1
# Modify rows so we write log records. We're writing a lot more than a
# single log file, so we know the underlying library will churn through
# log files.
+ def get_prealloc_stat(self):
+ stat_cursor = self.session.open_cursor('statistics:', None, None)
+ prealloc = stat_cursor[stat.conn.log_prealloc_max][2]
+ stat_cursor.close()
+ return prealloc
+
def populate(self, nentries):
c = self.session.open_cursor(self.uri, None, None)
for i in range(0, nentries):
# Make the values about 200 bytes. That's about 1MB of data for
# 5000 records, generating 10 log files used plus more for overhead.
c[i] = "abcde" * 40
+ if i % 500 == 0:
+ prealloc = self.get_prealloc_stat()
+ if prealloc > self.max_prealloc:
+ self.max_prealloc = prealloc
c.close()
# Wait for a log file to be pre-allocated. Avoid timing problems, but
@@ -55,7 +67,7 @@ class test_bug019(wttest.WiredTigerTestCase):
f = fnmatch.filter(os.listdir('.'), "*Prep*")
if f:
return f
- time.sleep(1)
+ time.sleep(1.0)
self.assertFalse(not f)
# There was a bug where pre-allocated log files accumulated on
@@ -63,8 +75,10 @@ class test_bug019(wttest.WiredTigerTestCase):
def test_bug019(self):
# Create a table just to write something into the log.
self.session.create(self.uri, 'key_format=i,value_format=S')
+ start_prealloc = self.get_prealloc_stat()
self.populate(self.entries)
self.session.checkpoint()
+ self.assertTrue(self.max_prealloc > start_prealloc)
# Loop, making sure pre-allocation is working and the range is moving.
older = self.prepfiles()
@@ -80,5 +94,14 @@ class test_bug019(wttest.WiredTigerTestCase):
older = newer
self.session.checkpoint()
+ # Wait for up to 30 seconds for pre-allocate to drop in an idle system
+ # it should usually be fast, but on slow systems can take time.
+ for sleepcount in range(1,30):
+ new_prealloc = self.get_prealloc_stat()
+ if new_prealloc < self.max_prealloc:
+ break
+ time.sleep(1.0)
+ self.assertTrue(sleepcount < 30)
+
if __name__ == '__main__':
wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_las01.py b/src/third_party/wiredtiger/test/suite/test_las01.py
index f47df3be9ac..25648b4c0e6 100644
--- a/src/third_party/wiredtiger/test/suite/test_las01.py
+++ b/src/third_party/wiredtiger/test/suite/test_las01.py
@@ -92,9 +92,6 @@ class test_las01(wttest.WiredTigerTestCase):
conn.close()
def test_las(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Create a small table.
uri = "table:test_las01"
nrows = 100
diff --git a/src/third_party/wiredtiger/test/suite/test_las02.py b/src/third_party/wiredtiger/test/suite/test_las02.py
index 7291214fe7e..af089d6c19e 100644
--- a/src/third_party/wiredtiger/test/suite/test_las02.py
+++ b/src/third_party/wiredtiger/test/suite/test_las02.py
@@ -62,9 +62,6 @@ class test_las02(wttest.WiredTigerTestCase):
self.assertEqual(count, nrows)
def test_las(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
nrows = 10000
# Create a table without logging to ensure we get "skew_newest" lookaside eviction behavior.
diff --git a/src/third_party/wiredtiger/test/suite/test_las03.py b/src/third_party/wiredtiger/test/suite/test_las03.py
index 6934bd9a741..6fcc4a3ccfd 100644
--- a/src/third_party/wiredtiger/test/suite/test_las03.py
+++ b/src/third_party/wiredtiger/test/suite/test_las03.py
@@ -58,9 +58,6 @@ class test_las03(wttest.WiredTigerTestCase):
cursor.close()
def test_checkpoint_las_reads(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Create a small table.
uri = "table:test_las03"
nrows = 100
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare01.py b/src/third_party/wiredtiger/test/suite/test_prepare01.py
index d88fdff9fd6..20615ab836c 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare01.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare01.py
@@ -103,9 +103,6 @@ class test_prepare01(wttest.WiredTigerTestCase):
# Loop through a set of inserts, periodically committing; before each
# commit, verify the number of visible records matches the expected value.
def test_visibility(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=' + self.key_format +
',value_format=' + self.value_format)
@@ -151,9 +148,6 @@ class test_read_committed_default(wttest.WiredTigerTestCase):
return count
def test_read_committed_default(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri, 'key_format=S,value_format=S')
cursor = self.session.open_cursor(self.uri, None)
self.session.begin_transaction()
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare02.py b/src/third_party/wiredtiger/test/suite/test_prepare02.py
index d394cf4f046..532e3f86693 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare02.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare02.py
@@ -38,9 +38,6 @@ def timestamp_str(t):
class test_prepare02(wttest.WiredTigerTestCase, suite_subprocess):
def test_prepare_session_operations(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create("table:mytable", "key_format=S,value_format=S")
cursor = self.session.open_cursor("table:mytable", None)
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare03.py b/src/third_party/wiredtiger/test/suite/test_prepare03.py
index 870d62bb790..974a9d09b1c 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare03.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare03.py
@@ -74,9 +74,6 @@ class test_prepare03(wttest.WiredTigerTestCase):
# Create the table and test cursor operations.
def test_prepare_cursor(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
tablearg = self.uri + ':' + self.table_name
create_args = self.format
preparemsg = "/ not permitted in a prepared transaction/"
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare04.py b/src/third_party/wiredtiger/test/suite/test_prepare04.py
index cd4fe924293..2b13892fcaa 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare04.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare04.py
@@ -67,9 +67,6 @@ class test_prepare04(wttest.WiredTigerTestCase, suite_subprocess):
scenarios = make_scenarios(types, txncfg, preparecfg)
def test_prepare_conflict(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
c = self.session.open_cursor(self.uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare05.py b/src/third_party/wiredtiger/test/suite/test_prepare05.py
index 3b283dd8102..141398f6f6a 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare05.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare05.py
@@ -41,9 +41,6 @@ class test_prepare05(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'table:' + tablename
def test_timestamp_api(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri, 'key_format=i,value_format=i')
c = self.session.open_cursor(self.uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_cursor01.py b/src/third_party/wiredtiger/test/suite/test_prepare_cursor01.py
new file mode 100644
index 00000000000..a72af0ef5c3
--- /dev/null
+++ b/src/third_party/wiredtiger/test/suite/test_prepare_cursor01.py
@@ -0,0 +1,572 @@
+#!/usr/bin/env python
+#
+# Public Domain 2014-2018 MongoDB, Inc.
+# Public Domain 2008-2014 WiredTiger, Inc.
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+import wiredtiger, wttest
+from wtdataset import SimpleDataSet, SimpleIndexDataSet
+from wtdataset import SimpleLSMDataSet, ComplexDataSet, ComplexLSMDataSet
+from wtscenario import make_scenarios
+
+def timestamp_str(t):
+ return '%x' %t
+
+# test_prepare_cursor01.py
+# WT_CURSOR navigation (next/prev) tests with prepared transactions
+class test_prepare_cursor01(wttest.WiredTigerTestCase):
+
+ keyfmt = [
+ ('row-store', dict(keyfmt='i')),
+ ('column-store', dict(keyfmt='r')),
+ ]
+ types = [
+ ('table-simple', dict(uri='table', ds=SimpleDataSet)),
+ ]
+
+ iso_types = [
+ ('isolation_read_committed', dict(isolation='read-committed')),
+ ('isolation_snapshot', dict(isolation='snapshot'))
+ ]
+ scenarios = make_scenarios(types, keyfmt, iso_types)
+
+ def skip(self):
+ return self.keyfmt == 'r' and \
+ (self.ds.is_lsm() or self.uri == 'lsm')
+
+ # Test cursor navigate (next/prev) with prepared transactions.
+ # Cursor navigate with timestamp reads and non-timestamped reads.
+ # before cursor : with timestamp earlier to prepare timestamp.
+ # between cursor : with timestamp between prepare and commit timestamps.
+ # after cursor : with timestamp after commit timestamp.
+ # Cursor with out read timestamp behaviour should be same after cursor behavior.
+ def test_cursor_navigate_prepare_transaction(self):
+ if self.skip():
+ return
+
+ # Build an object.
+ uri = self.uri + ':test_prepare_cursor01'
+ ds = self.ds(self, uri, 50, key_format=self.keyfmt)
+ ds.populate()
+
+ # Session for non-timestamped reads.
+ session = self.conn.open_session()
+ cursor = session.open_cursor(uri, None)
+ cursor.set_key(ds.key(1))
+ cursor.remove()
+
+ # Session for timestamped reads before prepare timestamp.
+ before_ts_s = self.conn.open_session()
+ before_ts_c = before_ts_s.open_cursor(uri, None)
+ # Session for timestamped reads between prepare timestamp and commit timestamp.
+ between_ts_s = self.conn.open_session()
+ between_ts_c = between_ts_s.open_cursor(uri, None)
+ # Session for timestamped reads after commit timestamp.
+ after_ts_s = self.conn.open_session()
+ after_ts_c = after_ts_s.open_cursor(uri, None)
+
+ prep_session = self.conn.open_session()
+ prep_cursor = prep_session.open_cursor(uri, None)
+
+ # Scenario-1 : Check cursor navigate with insert in prepared transaction.
+ # Begin of Scenario-1.
+ # Data set at start has keys {2,3,4 ... 50}
+ # Insert key 51 to check next operation.
+ # Insert key 1 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(51))
+ prep_cursor.set_value(ds.value(51))
+ prep_cursor.insert()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(100))
+
+ # Point all cursors to key 50.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(50))
+ before_ts_c.set_key(ds.key(50))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(150))
+ between_ts_c.set_key(ds.key(50))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(250))
+ after_ts_c.set_key(ds.key(50))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(50))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of newly inserted, prepared update.
+
+ # As read is before prepare timestamp, next is not found.
+ self.assertEquals(before_ts_c.next(), wiredtiger.WT_NOTFOUND)
+ # As read is between, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.next())
+ # Check to see prev works when a next returns prepare conflict.
+ self.assertEquals(between_ts_c.prev(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(50))
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.next())
+ # As read is after, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.next())
+ # As read is non-timestamped, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.next())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(200))
+
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), next is not found.
+ self.assertEquals(between_ts_c.next(), wiredtiger.WT_NOTFOUND)
+ between_ts_s.commit_transaction()
+ # As read is after, next will point to new key 51
+ self.assertEquals(after_ts_c.next(), 0)
+ self.assertEquals(after_ts_c.get_key(), ds.key(51))
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should find new key 51.
+ self.assertEquals(cursor.next(), 0)
+ self.assertEquals(cursor.get_key(), ds.key(51))
+ session.commit_transaction()
+
+ # Insert key 1 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(1))
+ prep_cursor.set_value(ds.value(1))
+ prep_cursor.insert()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(100))
+
+ # Point all cursors to key 2.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(50))
+ before_ts_c.set_key(ds.key(2))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(150))
+ between_ts_c.set_key(ds.key(2))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(250))
+ after_ts_c.set_key(ds.key(2))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(2))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of newly inserted, prepared update.
+
+ # As read is before prepare timestamp, prev is not found.
+ self.assertEquals(before_ts_c.prev(), wiredtiger.WT_NOTFOUND)
+ before_ts_s.commit_transaction()
+ # As read is between, prev will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.prev())
+ # Check to see next works when a prev returns prepare conflict.
+ self.assertEquals(between_ts_c.next(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(2))
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.prev())
+ # As read is after, prev will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.prev())
+ # As read is non-timestamped, prev will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.prev())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(200))
+
+ # As read is between(i.e before commit), prev is not found.
+ self.assertEquals(between_ts_c.prev(), wiredtiger.WT_NOTFOUND)
+ between_ts_s.commit_transaction()
+ # As read is after, prev will point to new key 1.
+ self.assertEquals(after_ts_c.prev(), 0)
+ self.assertEquals(after_ts_c.get_key(), ds.key(1))
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should find new key 1.
+ self.assertEquals(cursor.prev(), 0)
+ self.assertEquals(cursor.get_key(), ds.key(1))
+ session.commit_transaction()
+
+ # End of Scenario-1.
+
+ # Scenario-2 : Check cursor navigate with update in prepared transaction.
+ # Begin of Scenario-2.
+ # Data set at start has keys {1,2,3,4 ... 50,51}
+ # Update key 51 to check next operation.
+ # Update key 1 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(51))
+ prep_cursor.set_value(ds.value(151))
+ prep_cursor.update()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(300))
+
+ # Point all cursors to key 51.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(250))
+ before_ts_c.set_key(ds.key(50))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(350))
+ between_ts_c.set_key(ds.key(50))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(450))
+ after_ts_c.set_key(ds.key(50))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(50))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of newly inserted, prepared update.
+
+ # As read is before prepare timestamp, next is found with previous value.
+ self.assertEquals(before_ts_c.next(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(51))
+ self.assertEquals(before_ts_c.get_value(), ds.value(51))
+ # As read is between, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.next())
+ # As read is after, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.next())
+ # As read is non-timestamped, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.next())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(400))
+
+ # Check to see before cursor still gets the old value.
+ before_ts_c.set_key(ds.key(51))
+ self.assertEquals(before_ts_c.search(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(51))
+ self.assertEquals(before_ts_c.get_value(), ds.value(51))
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), next is not found.
+ self.assertEquals(between_ts_c.next(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(51))
+ self.assertEquals(between_ts_c.get_value(), ds.value(51))
+ between_ts_s.commit_transaction()
+ # As read is after, next will point to new key 51.
+ self.assertEquals(after_ts_c.next(), 0)
+ self.assertEquals(after_ts_c.get_key(), ds.key(51))
+ self.assertEquals(after_ts_c.get_value(), ds.value(151))
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should find new key 51.
+ self.assertEquals(cursor.next(), 0)
+ self.assertEquals(cursor.get_key(), ds.key(51))
+ self.assertEquals(cursor.get_value(), ds.value(151))
+ session.commit_transaction()
+
+ # Update key 1 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(1))
+ prep_cursor.set_value(ds.value(111))
+ prep_cursor.update()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(300))
+
+ # Point all cursors to key 2.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(250))
+ before_ts_c.set_key(ds.key(2))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(350))
+ between_ts_c.set_key(ds.key(2))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(450))
+ after_ts_c.set_key(ds.key(2))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(2))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of new update of prepared transaction.
+
+ # As read is before prepare timestamp, prev is not found.
+ self.assertEquals(before_ts_c.prev(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(1))
+ self.assertEquals(before_ts_c.get_value(), ds.value(1))
+ # As read is between, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.prev())
+ # As read is after, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.prev())
+ # As read is non-timestamped, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.prev())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(400))
+
+ # Check to see before cursor still gets the old value.
+ before_ts_c.set_key(ds.key(1))
+ self.assertEquals(before_ts_c.search(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(1))
+ self.assertEquals(before_ts_c.get_value(), ds.value(1))
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), prev should get old value.
+ self.assertEquals(between_ts_c.prev(), 0)
+ self.assertEquals(between_ts_c.get_value(), ds.value(1))
+ between_ts_s.commit_transaction()
+ # As read is after, prev should get new value.
+ self.assertEquals(after_ts_c.prev(), 0)
+ self.assertEquals(after_ts_c.get_key(), ds.key(1))
+ self.assertEquals(after_ts_c.get_value(), ds.value(111))
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should find new key 1.
+ self.assertEquals(cursor.prev(), 0)
+ self.assertEquals(cursor.get_key(), ds.key(1))
+ self.assertEquals(cursor.get_value(), ds.value(111))
+ session.commit_transaction()
+
+ # End of Scenario-2.
+
+ # Scenario-3 : Check cursor navigate with remove in prepared transaction.
+ # Begin of Scenario-3.
+ # Data set at start has keys {1,2,3,4 ... 50,51}
+ # Remove key 51 to check next operation.
+ # Remove key 1 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(51))
+ prep_cursor.remove()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(500))
+
+ # Point all cursors to key 51.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(450))
+ before_ts_c.set_key(ds.key(50))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(550))
+ between_ts_c.set_key(ds.key(50))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(650))
+ after_ts_c.set_key(ds.key(50))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(50))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of removed prepared update.
+
+ # As read is before prepare timestamp, next is found with key 51.
+ self.assertEquals(before_ts_c.next(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(51))
+ # As read is between, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.next())
+ # As read is after, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.next())
+ # As read is non-timestamped, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.next())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(600))
+
+ # Check to see before cursor still gets the old value.
+ before_ts_c.set_key(ds.key(51))
+ self.assertEquals(before_ts_c.search(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(51))
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), next is not found.
+ self.assertEquals(between_ts_c.next(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(51))
+ between_ts_s.commit_transaction()
+ # As read is after, next will point beyond end.
+ self.assertEquals(after_ts_c.next(), wiredtiger.WT_NOTFOUND)
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should not find a key.
+ self.assertEquals(cursor.next(), wiredtiger.WT_NOTFOUND)
+ session.commit_transaction()
+
+ # Remove key 1 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(1))
+ prep_cursor.remove()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(500))
+
+ # Point all cursors to key 2.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(450))
+ before_ts_c.set_key(ds.key(2))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(550))
+ between_ts_c.set_key(ds.key(2))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(650))
+ after_ts_c.set_key(ds.key(2))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(2))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of new update of prepared transaction.
+
+ # As read is before prepare timestamp, prev is not found.
+ self.assertEquals(before_ts_c.prev(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(1))
+ # As read is between, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.prev())
+ # As read is after, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.prev())
+ # As read is non-timestamped, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.prev())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(600))
+
+ # Check to see before cursor still gets the old value.
+ before_ts_c.set_key(ds.key(1))
+ self.assertEquals(before_ts_c.search(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(1))
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), prev should get old value.
+ self.assertEquals(between_ts_c.prev(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(1))
+ between_ts_s.commit_transaction()
+ # As read is after, prev should get new value.
+ self.assertEquals(after_ts_c.prev(), wiredtiger.WT_NOTFOUND)
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should find new key 1.
+ self.assertEquals(cursor.prev(), wiredtiger.WT_NOTFOUND)
+ session.commit_transaction()
+
+ # End of Scenario-3.
+
+ # Scenario-4 : Check cursor navigate with remove in prepared transaction.
+ # remove keys not in the ends.
+ # Begin of Scenario-4.
+ # Data set at start has keys {2,3,4 ... 50}
+ # Remove key 49 to check next operation.
+ # Remove key 3 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(49))
+ prep_cursor.remove()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(700))
+
+ # Point all cursors to key 48.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(650))
+ before_ts_c.set_key(ds.key(48))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(750))
+ between_ts_c.set_key(ds.key(48))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(850))
+ after_ts_c.set_key(ds.key(48))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(48))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of removed prepared update.
+
+ # As read is before prepare timestamp, next is found with key 49.
+ self.assertEquals(before_ts_c.next(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(49))
+ # As read is between, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.next())
+ # As read is after, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.next())
+ # As read is non-timestamped, next will point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.next())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(800))
+
+ # Check to see before cursor still gets the old value.
+ before_ts_c.set_key(ds.key(49))
+ self.assertEquals(before_ts_c.search(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(49))
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), next is not found.
+ self.assertEquals(between_ts_c.next(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(49))
+ between_ts_s.commit_transaction()
+ # As read is after, next will point beyond end.
+ self.assertEquals(after_ts_c.next(), 0)
+ self.assertEquals(after_ts_c.get_key(), ds.key(50))
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should not find a key.
+ self.assertEquals(cursor.next(), 0)
+ self.assertEquals(cursor.get_key(), ds.key(50))
+ session.commit_transaction()
+
+ # Remove key 3 to check prev operation.
+ prep_session.begin_transaction()
+ prep_cursor.set_key(ds.key(3))
+ prep_cursor.remove()
+ prep_session.prepare_transaction('prepare_timestamp=' + timestamp_str(700))
+
+ # Point all cursors to key 4.
+ before_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(650))
+ before_ts_c.set_key(ds.key(4))
+ self.assertEquals(before_ts_c.search(), 0)
+
+ between_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(750))
+ between_ts_c.set_key(ds.key(4))
+ self.assertEquals(between_ts_c.search(), 0)
+
+ after_ts_s.begin_transaction('isolation=' + self.isolation + ',read_timestamp=' + timestamp_str(850))
+ after_ts_c.set_key(ds.key(4))
+ self.assertEquals(after_ts_c.search(), 0)
+
+ session.begin_transaction('isolation=' + self.isolation)
+ cursor.set_key(ds.key(4))
+ self.assertEquals(cursor.search(), 0)
+
+ # Check the visibility of new update of prepared transaction.
+
+ # As read is before prepare timestamp, prev is not found.
+ self.assertEquals(before_ts_c.prev(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(3))
+ # As read is between, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: between_ts_c.prev())
+ # As read is after, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: after_ts_c.prev())
+ # As read is non-timestamped, prev should point to prepared update.
+ self.assertRaisesException(wiredtiger.WiredTigerError, lambda: cursor.prev())
+
+ # Commit the prepared transaction.
+ prep_session.commit_transaction('commit_timestamp=' + timestamp_str(800))
+
+ # Check to see before cursor still gets the old value.
+ before_ts_c.set_key(ds.key(3))
+ self.assertEquals(before_ts_c.search(), 0)
+ self.assertEquals(before_ts_c.get_key(), ds.key(3))
+ before_ts_s.commit_transaction()
+ # As read is between(i.e before commit), prev should get old value.
+ self.assertEquals(between_ts_c.prev(), 0)
+ self.assertEquals(between_ts_c.get_key(), ds.key(3))
+ between_ts_s.commit_transaction()
+ # As read is after, prev should get new value.
+ self.assertEquals(after_ts_c.prev(), 0)
+ self.assertEquals(after_ts_c.get_key(), ds.key(2))
+ after_ts_s.commit_transaction()
+ # Non-timestamped read should find new key 2.
+ self.assertEquals(cursor.prev(), 0)
+ self.assertEquals(cursor.get_key(), ds.key(2))
+ session.commit_transaction()
+
+ # End of Scenario-4.
+
+if __name__ == '__main__':
+ wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_lookaside01.py b/src/third_party/wiredtiger/test/suite/test_prepare_lookaside01.py
index 57dc4c7a116..066f85154cf 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare_lookaside01.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare_lookaside01.py
@@ -105,9 +105,6 @@ class test_prepare_lookaside01(wttest.WiredTigerTestCase):
sessions[j].close()
def test_prepare_lookaside(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Create a small table.
uri = "table:test_prepare_lookaside01"
nrows = 100
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_lookaside02.py b/src/third_party/wiredtiger/test/suite/test_prepare_lookaside02.py
index c1b817f992a..30a0a3efad6 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare_lookaside02.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare_lookaside02.py
@@ -59,9 +59,6 @@ class test_prepare_lookaside02(wttest.WiredTigerTestCase, suite_subprocess):
scenarios = make_scenarios(types, txn_end)
def test_prepare_conflict(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri, self.s_config)
c = self.session.open_cursor(self.uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_stat07.py b/src/third_party/wiredtiger/test/suite/test_stat07.py
new file mode 100644
index 00000000000..89af2347f20
--- /dev/null
+++ b/src/third_party/wiredtiger/test/suite/test_stat07.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+#
+# Public Domain 2014-2018 MongoDB, Inc.
+# Public Domain 2008-2014 WiredTiger, Inc.
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+import wiredtiger, wttest
+from wtdataset import SimpleDataSet
+from wtscenario import make_scenarios
+
+# test_stat07.py
+# Session statistics cursor configurations.
+class test_stat_cursor_config(wttest.WiredTigerTestCase):
+ pfx = 'test_op_stat_cursor_config'
+ uri = [
+ ('file', dict(uri='file:' + pfx, dataset=SimpleDataSet))
+ ]
+ data_config = [
+ ('none', dict(data_config='none', ok=[])),
+ ('all', dict(data_config='all', ok=['empty', 'fast', 'all'])),
+ ('fast', dict(data_config='fast', ok=['empty', 'fast']))
+ ]
+ cursor_config = [
+ ('empty', dict(cursor_config='empty')),
+ ( 'all', dict(cursor_config='all')),
+ ('fast', dict(cursor_config='fast')),
+ ]
+
+ scenarios = make_scenarios(uri, data_config, cursor_config)
+
+ # Turn on statistics for this test.
+ def conn_config(self):
+ return 'statistics=(%s)' % self.data_config
+
+ # For each database/cursor configuration, confirm the right combinations
+ # succeed or fail. Traverse the statistics cursor and fetch the statistics.
+ def test_stat_cursor_config(self):
+ self.dataset(self, self.uri, 100).populate()
+ config = 'statistics=('
+ if self.cursor_config != 'empty':
+ config = config + self.cursor_config
+ config = config + ')'
+ if self.ok and self.cursor_config in self.ok:
+ found = False
+ stat_cur = self.session.open_cursor('statistics:session', None, config)
+
+ # A reset on session should reset the statistics values to zero.
+ self.session.reset()
+ stat_cur.reset()
+ while stat_cur.next() == 0:
+ [desc, pvalue, value] = stat_cur.get_values()
+ self.assertEquals(value, 0)
+ found = True
+ self.assertEquals(found, True)
+
+ else:
+ msg = '/database statistics configuration/'
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda:
+ self.session.open_cursor('statistics:session', None, config), msg)
+
+if __name__ == '__main__':
+ wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp01.py b/src/third_party/wiredtiger/test/suite/test_timestamp01.py
index d0b60e2a529..8aa07174c33 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp01.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp01.py
@@ -38,9 +38,6 @@ def timestamp_str(t):
class test_timestamp01(wttest.WiredTigerTestCase, suite_subprocess):
def test_timestamp_range(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Cannot set a timestamp on a non-running transaction
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.timestamp_transaction(
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp02.py b/src/third_party/wiredtiger/test/suite/test_timestamp02.py
index ab1572a7c06..91e79993769 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp02.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp02.py
@@ -66,9 +66,6 @@ class test_timestamp02(wttest.WiredTigerTestCase, suite_subprocess):
session.commit_transaction()
def test_basic(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
c = self.session.open_cursor(self.uri)
@@ -136,9 +133,6 @@ class test_timestamp02(wttest.WiredTigerTestCase, suite_subprocess):
dict((k, 2) for k in orig_keys[i+1:]))
def test_read_your_writes(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
c = self.session.open_cursor(self.uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp03.py b/src/third_party/wiredtiger/test/suite/test_timestamp03.py
index db1d97365d7..204131824ff 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp03.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp03.py
@@ -154,9 +154,6 @@ class test_timestamp03(wttest.WiredTigerTestCase, suite_subprocess):
valcnt_nots_log, valcnt_nots_nolog)
def test_timestamp03(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
uri_ts_log = self.uri + self.table_ts_log
uri_ts_nolog = self.uri + self.table_ts_nolog
uri_nots_log = self.uri + self.table_nots_log
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp04.py b/src/third_party/wiredtiger/test/suite/test_timestamp04.py
index 77a55a447b0..eadfa06fb3f 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp04.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp04.py
@@ -108,9 +108,6 @@ class test_timestamp04(wttest.WiredTigerTestCase, suite_subprocess):
self.session = self.conn.open_session(None)
def test_rollback_to_stable(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.ConnectionOpen(self.cacheSize)
# Configure small page sizes to ensure eviction comes through and we
# have a somewhat complex tree.
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp05.py b/src/third_party/wiredtiger/test/suite/test_timestamp05.py
index be369c3fa69..c346885fc7e 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp05.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp05.py
@@ -42,9 +42,6 @@ class test_timestamp05(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'table:ts05'
def test_create(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
s = self.session
conn = self.conn
@@ -64,9 +61,6 @@ class test_timestamp05(wttest.WiredTigerTestCase, suite_subprocess):
s.checkpoint('use_timestamp=true')
def test_bulk(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
s = self.session
conn = self.conn
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp06.py b/src/third_party/wiredtiger/test/suite/test_timestamp06.py
index 15425ce4027..3951bbeccb8 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp06.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp06.py
@@ -121,9 +121,6 @@ class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
self.backup_check(check_value, valcnt_ts_log, valcnt_ts_nolog)
def test_timestamp06(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Open two timestamp tables:
# 1. Table is logged and uses timestamps.
# 2. Table is not logged and uses timestamps.
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp07.py b/src/third_party/wiredtiger/test/suite/test_timestamp07.py
index 625e119831d..065bf68ee53 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp07.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp07.py
@@ -173,9 +173,6 @@ class test_timestamp07(wttest.WiredTigerTestCase, suite_subprocess):
check_value, valcnt, valcnt2, valcnt)
def test_timestamp07(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
uri = self.uri + self.tablename
uri2 = self.uri + self.tablename2
uri3 = self.uri + self.tablename3
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp08.py b/src/third_party/wiredtiger/test/suite/test_timestamp08.py
deleted file mode 100644
index e72e3c62b58..00000000000
--- a/src/third_party/wiredtiger/test/suite/test_timestamp08.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-#
-# Public Domain 2014-2018 MongoDB, Inc.
-# Public Domain 2008-2014 WiredTiger, Inc.
-#
-# This is free and unencumbered software released into the public domain.
-#
-# Anyone is free to copy, modify, publish, use, compile, sell, or
-# distribute this software, either in source code form or as a compiled
-# binary, for any purpose, commercial or non-commercial, and by any
-# means.
-#
-# In jurisdictions that recognize copyright laws, the author or authors
-# of this software dedicate any and all copyright interest in the
-# software to the public domain. We make this dedication for the benefit
-# of the public at large and to the detriment of our heirs and
-# successors. We intend this dedication to be an overt act of
-# relinquishment in perpetuity of all present and future rights to this
-# software under copyright law.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-# test_timestamp08.py
-# Timestamps: API usage generates expected error with timestamps disabled
-#
-
-from suite_subprocess import suite_subprocess
-import wiredtiger, wttest
-
-def timestamp_str(t):
- return '%x' % t
-
-class test_timestamp08(wttest.WiredTigerTestCase, suite_subprocess):
- tablename = 'test_timestamp08'
- uri = 'table:' + tablename
-
- def test_timestamp_disabled(self):
- if wiredtiger.timestamp_build():
- self.skipTest('requires a non-timestamp build')
-
- self.session.create(self.uri, 'key_format=i,value_format=i')
- c = self.session.open_cursor(self.uri)
-
- # Begin by adding some data
- self.session.begin_transaction()
- c[1] = 1
- self.session.commit_transaction()
-
- # setting a read_timestamp on a txn should fail
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.session.begin_transaction(
- 'read_timestamp=' + timestamp_str(1)),
- '/requires a version of WiredTiger built with timestamp support/')
-
- # setting a commit_timestamp on a txn should fail
- self.session.begin_transaction()
- c[2] = 2
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.session.timestamp_transaction(
- 'commit_timestamp=' + timestamp_str(1)),
- '/requires a version of WiredTiger built with timestamp support/')
- self.session.rollback_transaction()
-
- # committing a txn with commit_timestamp should fail
- self.session.begin_transaction()
- c[2] = 2
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.session.commit_transaction(
- 'commit_timestamp=' + timestamp_str(1)),
- '/requires a version of WiredTiger built with timestamp support/')
-
- # query_timestamp should fail
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.conn.query_timestamp(),
- '/requires a version of WiredTiger built with timestamp support/')
-
- # settings various timestamps should fail
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.conn.set_timestamp(
- 'oldest_timestamp=' + timestamp_str(1)),
- '/requires a version of WiredTiger built with timestamp support/')
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.conn.set_timestamp(
- 'stable_timestamp=' + timestamp_str(1)),
- '/requires a version of WiredTiger built with timestamp support/')
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.conn.set_timestamp(
- 'commit_timestamp=' + timestamp_str(1)),
- '/requires a version of WiredTiger built with timestamp support/')
-
-if __name__ == '__main__':
- wttest.run()
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp09.py b/src/third_party/wiredtiger/test/suite/test_timestamp09.py
index 862fa31e681..5831b01b3da 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp09.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp09.py
@@ -41,9 +41,6 @@ class test_timestamp09(wttest.WiredTigerTestCase, suite_subprocess):
uri = 'table:' + tablename
def test_timestamp_api(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri, 'key_format=i,value_format=i')
c = self.session.open_cursor(self.uri)
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp10.py b/src/third_party/wiredtiger/test/suite/test_timestamp10.py
index ca703ec07f4..560f69023cc 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp10.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp10.py
@@ -126,9 +126,6 @@ class test_timestamp10(wttest.WiredTigerTestCase, suite_subprocess):
self.assertTimestampsEqual(q, timestamp_str(expected_rec_ts))
def test_timestamp_recovery(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
# Add some data and checkpoint at a stable timestamp.
last_stable = self.data_and_checkpoint()
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp11.py b/src/third_party/wiredtiger/test/suite/test_timestamp11.py
index f98b7c47b2b..1bd9e771351 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp11.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp11.py
@@ -38,9 +38,6 @@ def timestamp_str(t):
class test_timestamp11(wttest.WiredTigerTestCase, suite_subprocess):
def test_timestamp_range(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
base = 'timestamp11'
uri = 'file:' + base
self.session.create(uri, 'key_format=S,value_format=S')
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp12.py b/src/third_party/wiredtiger/test/suite/test_timestamp12.py
index a8f230572b1..4419f42a092 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp12.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp12.py
@@ -64,9 +64,6 @@ class test_timestamp12(wttest.WiredTigerTestCase):
self.assertTrue(coll_actual == coll_exp)
def test_timestamp_recovery(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
#
# Create several collection-like tables that are checkpoint durability.
# Add data to each of them separately and checkpoint so that each one
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp13.py b/src/third_party/wiredtiger/test/suite/test_timestamp13.py
index d3a142c0f2f..5644940d8c5 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp13.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp13.py
@@ -48,9 +48,6 @@ class test_timestamp13(wttest.WiredTigerTestCase, suite_subprocess):
conn_config = 'log=(enabled)'
def test_degenerate_timestamps(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
@@ -80,9 +77,6 @@ class test_timestamp13(wttest.WiredTigerTestCase, suite_subprocess):
lambda: self.session.query_timestamp('get=' + query))
def test_query_read_commit_timestamps(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
@@ -109,9 +103,6 @@ class test_timestamp13(wttest.WiredTigerTestCase, suite_subprocess):
self.session.commit_transaction()
def test_query_round_read_timestamp(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
@@ -132,9 +123,6 @@ class test_timestamp13(wttest.WiredTigerTestCase, suite_subprocess):
self.session.commit_transaction()
def test_query_prepare_timestamp(self):
- if not wiredtiger.timestamp_build():
- self.skipTest('requires a timestamp build')
-
self.session.create(self.uri,
'key_format=i,value_format=i' + self.extra_config)
diff --git a/src/third_party/wiredtiger/test/suite/test_txn17.py b/src/third_party/wiredtiger/test/suite/test_txn17.py
index d634a8cae8a..8a046410ef1 100644
--- a/src/third_party/wiredtiger/test/suite/test_txn17.py
+++ b/src/third_party/wiredtiger/test/suite/test_txn17.py
@@ -42,11 +42,10 @@ class test_txn17(wttest.WiredTigerTestCase, suite_subprocess):
def test_txn_api(self):
# Test API functionality tagged as requires_transaction.
# Cannot set a timestamp on a non-running transaction.
- if wiredtiger.timestamp_build():
- self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: self.session.timestamp_transaction(
- 'commit_timestamp=' + timestamp_str(1 << 5000)),
- '/only permitted in a running/')
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.session.timestamp_transaction(
+ 'commit_timestamp=' + timestamp_str(1 << 5000)),
+ '/only permitted in a running/')
# Cannot call commit on a non-running transaction.
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
diff --git a/src/third_party/wiredtiger/test/suite/test_txn19.py b/src/third_party/wiredtiger/test/suite/test_txn19.py
index fc1f86bcd54..1689074bbe3 100755
--- a/src/third_party/wiredtiger/test/suite/test_txn19.py
+++ b/src/third_party/wiredtiger/test/suite/test_txn19.py
@@ -303,8 +303,7 @@ class test_txn19(wttest.WiredTigerTestCase, suite_subprocess):
if expect_fail:
self.check_file_contains_one_of(errfile,
['/log file.*corrupted/',
- 'WT_ERROR: non-specific WiredTiger error',
- '/No such file/'])
+ 'WT_TRY_SALVAGE: database corruption detected'])
else:
self.check_empty_file(errfile)
if self.expect_warning_corruption():