diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-11-21 11:29:32 +1100 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-11-21 11:29:32 +1100 |
commit | 820e9411adda1ba8da5909317bac7a9229f49efe (patch) | |
tree | 094a90e10912196dcf68da7e79333bdce498b36b | |
parent | 51e3648d02cc25c95fa72af13c766690956110bc (diff) | |
download | mongo-820e9411adda1ba8da5909317bac7a9229f49efe.tar.gz |
Import wiredtiger: a065c83d8dd73d1c0199f742d6ee15d73c7e1394 from branch mongodb-4.2
ref: fe4a3f763b..a065c83d8d
for: 4.1.6
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-4403 Add statistic tracking accumulated dirty cache
WT-4405 Fix cursor next and prev for prepared transactions
WT-4409 Fix workgen throttling
27 files changed, 1730 insertions, 579 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/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..9ad4cdd667a 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, SessionOpStat.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('cache_full_wait', 'time waiting for cache (usecs)'), + SessionStat('bytes_read', 'bytes read into cache'), + SessionStat('bytes_written', 'bytes written from cache'), + SessionStat('handle_lock_wait', 'handle 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)'), + SessionStat('schema_lock_wait', 'schema lock wait time (usecs)'), +] + +session_stats = sorted(session_stats, key=attrgetter('desc')) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 9dc5799b54d..2697389e278 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -1,5 +1,5 @@ { - "commit": "fe4a3f763bd9951cb7afcb55c03a942e24a4a588", + "commit": "a065c83d8dd73d1c0199f742d6ee15d73c7e1394", "github": "wiredtiger/wiredtiger.git", "vendor": "wiredtiger", "branch": "mongodb-4.2" 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_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/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/cursor/cur_stat.c b/src/third_party/wiredtiger/src/cursor/cur_stat.c index 25d4b588d3b..4a49a2a141e 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 operation. + */ +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_written = 0; + session->stats.read_time = 0; + session->stats.write_time = 0; + session->stats.cache_full_wait = 0; + session->stats.schema_lock_wait = 0; + session->stats.handle_lock_wait = 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/include/btree.h b/src/third_party/wiredtiger/src/include/btree.h index a44c010e51d..e4e67ba4744 100644 --- a/src/third_party/wiredtiger/src/include/btree.h +++ b/src/third_party/wiredtiger/src/include/btree.h @@ -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..80797325e26 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); } 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..5fd50cff29b 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)); 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..27c3099c38f 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_written; + int64_t handle_lock_wait; + int64_t read_time; + int64_t write_time; + int64_t schema_lock_wait; + int64_t cache_full_wait; +}; + /* Statistics section: END */ diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index 76151082135..551491a1617 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -5058,725 +5058,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 +5898,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 +6197,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_WRITTEN 4001 +/*! session: handle lock wait time (usecs) */ +#define WT_STAT_SESSION_HANDLE_LOCK_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_SCHEMA_LOCK_WAIT 4005 +/*! session: time waiting for cache (usecs) */ +#define WT_STAT_SESSION_CACHE_FULL_WAIT 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..365d1370e44 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; diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c index 857003c7abe..85740d4935b 100644 --- a/src/third_party/wiredtiger/src/session/session_api.c +++ b/src/third_party/wiredtiger/src/session/session_api.c @@ -2231,6 +2231,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..0204be3aa76 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: handle 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_written = 0; + stats->handle_lock_wait = 0; + stats->read_time = 0; + stats->write_time = 0; + stats->schema_lock_wait = 0; + stats->cache_full_wait = 0; +} 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_stat07.py b/src/third_party/wiredtiger/test/suite/test_stat07.py new file mode 100644 index 00000000000..f07dfed94b5 --- /dev/null +++ b/src/third_party/wiredtiger/test/suite/test_stat07.py @@ -0,0 +1,73 @@ +#!/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. + 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: + self.session.open_cursor('statistics:session', None, config) + else: + msg = '/database statistics configuration/' + self.assertRaisesWithMessage(wiredtiger.WiredTigerError, lambda: + self.session.open_cursor('statistics:session', None, config), msg) + +if __name__ == '__main__': + wttest.run() |