diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-06-25 14:17:50 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-06-25 14:17:50 +1000 |
commit | 6b917a9b0ee36ef3ec51e73f461693e9677aa1cf (patch) | |
tree | ce0bc34c5f928228a46027ed6bf6452e7fe61305 /src/third_party | |
parent | d7ed31017007fd5963390247e6ae68714cb6a61c (diff) | |
download | mongo-6b917a9b0ee36ef3ec51e73f461693e9677aa1cf.tar.gz |
Import wiredtiger: a8a6314182ccf7dc6625b9c24891a355b07faa8e from branch mongodb-4.0
ref: 7d3e691fd4..a8a6314182
for: 4.1.1
WT-4048 Generalize timing_stress_for_test split functionality
WT-4101 Don't abort the eviction server during session verify when oldest_timestamp is held back
WT-4133 Coverity 1393445, 1393446 Dereference before null check
WT-4139 Rename the cursor restart statistic to match implementation
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/wiredtiger/dist/stat_data.py | 16 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_split.c | 39 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_sync.c | 20 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/cache/cache_las.c | 20 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/misc.h | 3 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/misc.i | 23 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/stat.h | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/wiredtiger.in | 40 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/support/stat.c | 14 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_ckpt.c | 8 |
11 files changed, 89 insertions, 100 deletions
diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index c1b43ac6b2d..135c930b306 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -238,9 +238,9 @@ connection_stats = [ CacheStat('cache_eviction_state', 'eviction state', 'no_clear,no_scale'), CacheStat('cache_eviction_target_page_ge128', 'eviction walk target pages histogram - 128 and higher'), CacheStat('cache_eviction_target_page_lt10', 'eviction walk target pages histogram - 0-9'), + CacheStat('cache_eviction_target_page_lt128', 'eviction walk target pages histogram - 64-128'), CacheStat('cache_eviction_target_page_lt32', 'eviction walk target pages histogram - 10-31'), CacheStat('cache_eviction_target_page_lt64', 'eviction walk target pages histogram - 32-63'), - CacheStat('cache_eviction_target_page_lt128', 'eviction walk target pages histogram - 64-128'), CacheStat('cache_eviction_walk', 'pages walked for eviction'), CacheStat('cache_eviction_walk_from_root', 'eviction walks started from root of tree'), CacheStat('cache_eviction_walk_passes', 'eviction passes of a file'), @@ -294,11 +294,11 @@ connection_stats = [ CursorStat('cursor_modify', 'cursor modify calls'), CursorStat('cursor_next', 'cursor next calls'), CursorStat('cursor_prev', 'cursor prev calls'), - CursorStat('cursor_reopen', 'cursors reused from cache'), CursorStat('cursor_remove', 'cursor remove calls'), + CursorStat('cursor_reopen', 'cursors reused from cache'), CursorStat('cursor_reserve', 'cursor reserve calls'), CursorStat('cursor_reset', 'cursor reset calls'), - CursorStat('cursor_restart', 'cursor restarted searches'), + CursorStat('cursor_restart', 'cursor operation restarted'), CursorStat('cursor_search', 'cursor search calls'), CursorStat('cursor_search_near', 'cursor search near calls'), CursorStat('cursor_truncate', 'truncate calls'), @@ -309,8 +309,8 @@ connection_stats = [ ########################################## CursorStat('cursor_sweep', 'cursor sweeps'), CursorStat('cursor_sweep_buckets', 'cursor sweep buckets'), - CursorStat('cursor_sweep_examined', 'cursor sweep cursors examined'), CursorStat('cursor_sweep_closed', 'cursor sweep cursors closed'), + CursorStat('cursor_sweep_examined', 'cursor sweep cursors examined'), ########################################## # Dhandle statistics @@ -507,9 +507,9 @@ connection_stats = [ TxnStat('txn_checkpoint_time_total', 'transaction checkpoint total time (msecs)', 'no_clear,no_scale'), TxnStat('txn_commit', 'transactions committed'), TxnStat('txn_commit_queue_empty', 'commit timestamp queue insert to empty'), - TxnStat('txn_commit_queue_tail', 'commit timestamp queue inserts to tail'), TxnStat('txn_commit_queue_inserts', 'commit timestamp queue inserts total'), TxnStat('txn_commit_queue_len', 'commit timestamp queue length'), + TxnStat('txn_commit_queue_tail', 'commit timestamp queue inserts to tail'), TxnStat('txn_fail_cache', 'transaction failures due to cache overflow'), TxnStat('txn_pinned_checkpoint_range', 'transaction range of IDs currently pinned by a checkpoint', 'no_clear,no_scale'), TxnStat('txn_pinned_range', 'transaction range of IDs currently pinned', 'no_clear,no_scale'), @@ -622,9 +622,9 @@ dsrc_stats = [ CacheStat('cache_eviction_split_leaf', 'leaf pages split during eviction'), CacheStat('cache_eviction_target_page_ge128', 'eviction walk target pages histogram - 128 and higher'), CacheStat('cache_eviction_target_page_lt10', 'eviction walk target pages histogram - 0-9'), + CacheStat('cache_eviction_target_page_lt128', 'eviction walk target pages histogram - 64-128'), CacheStat('cache_eviction_target_page_lt32', 'eviction walk target pages histogram - 10-31'), CacheStat('cache_eviction_target_page_lt64', 'eviction walk target pages histogram - 32-63'), - CacheStat('cache_eviction_target_page_lt128', 'eviction walk target pages histogram - 64-128'), CacheStat('cache_eviction_walk_from_root', 'eviction walks started from root of tree'), CacheStat('cache_eviction_walk_passes', 'eviction walk passes of a file'), CacheStat('cache_eviction_walk_saved_pos', 'eviction walks started from saved location in tree'), @@ -697,7 +697,7 @@ dsrc_stats = [ CursorStat('cursor_reopen', 'cursors reused from cache'), CursorStat('cursor_reserve', 'reserve calls'), CursorStat('cursor_reset', 'reset calls'), - CursorStat('cursor_restart', 'restarted searches'), + CursorStat('cursor_restart', 'cursor operation restarted'), CursorStat('cursor_search', 'search calls'), CursorStat('cursor_search_near', 'search near calls'), CursorStat('cursor_truncate', 'truncate calls'), @@ -741,8 +741,8 @@ dsrc_stats = [ ########################################## # Session operations ########################################## - SessionStat('session_cursor_cached', 'cached cursor count', 'no_clear,no_scale'), SessionStat('session_compact', 'object compaction'), + SessionStat('session_cursor_cached', 'cached cursor count', 'no_clear,no_scale'), SessionStat('session_cursor_open', 'open cursor count', 'no_clear,no_scale'), ########################################## diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 702b2430339..770e5ed12ec 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -1,5 +1,5 @@ { - "commit": "7d3e691fd4d5ba7810647c317692129fea694602", + "commit": "a8a6314182ccf7dc6625b9c24891a355b07faa8e", "github": "wiredtiger/wiredtiger.git", "vendor": "wiredtiger", "branch": "mongodb-4.0" diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c index 7061b92af78..62212607f18 100644 --- a/src/third_party/wiredtiger/src/btree/bt_split.c +++ b/src/third_party/wiredtiger/src/btree/bt_split.c @@ -31,24 +31,6 @@ typedef enum { } WT_SPLIT_ERROR_PHASE; /* - * __page_split_timing_stress -- - * Optionally add delay to simulate the race conditions in page split for - * debug purposes. The purpose is to uncover the race conditions in page split. - */ -static void -__page_split_timing_stress( - WT_SESSION_IMPL *session, uint64_t flag, uint64_t micro_seconds) -{ - WT_CONNECTION_IMPL *conn; - - conn = S2C(session); - - /* We only want to sleep when page split race flag is set. */ - if (FLD_ISSET(conn->timing_stress_flags, flag)) - __wt_sleep(0, micro_seconds); -} - -/* * __split_safe_free -- * Free a buffer if we can be sure no thread is accessing it, or schedule * it to be freed otherwise. @@ -566,8 +548,7 @@ __split_root(WT_SESSION_IMPL *session, WT_PAGE *root) WT_ERR(__split_ref_prepare(session, alloc_index, &locked, false)); /* Encourage a race */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_1, TIMING_STRESS_TEST_SLEEP); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_1); /* * Confirm the root page's index hasn't moved, then update it, which @@ -578,8 +559,7 @@ __split_root(WT_SESSION_IMPL *session, WT_PAGE *root) alloc_index = NULL; /* Encourage a race */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_2, TIMING_STRESS_TEST_SLEEP); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_2); /* * Get a generation for this split, mark the root page. This must be @@ -772,8 +752,7 @@ __split_parent(WT_SESSION_IMPL *session, WT_REF *ref, WT_REF **ref_new, WT_NOT_READ(complete, WT_ERR_PANIC); /* Encourage a race */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_3, TIMING_STRESS_TEST_SLEEP); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_3); /* * Confirm the parent page's index hasn't moved then update it, which @@ -784,8 +763,7 @@ __split_parent(WT_SESSION_IMPL *session, WT_REF *ref, WT_REF **ref_new, alloc_index = NULL; /* Encourage a race */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_4, TIMING_STRESS_TEST_SLEEP); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_4); /* * Get a generation for this split, mark the page. This must be after @@ -1125,8 +1103,7 @@ __split_internal(WT_SESSION_IMPL *session, WT_PAGE *parent, WT_PAGE *page) WT_ERR(__split_ref_prepare(session, alloc_index, &locked, true)); /* Encourage a race */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_5, TIMING_STRESS_TEST_SLEEP); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_5); /* Split into the parent. */ WT_ERR(__split_parent(session, page_ref, alloc_index->index, @@ -1140,8 +1117,7 @@ __split_internal(WT_SESSION_IMPL *session, WT_PAGE *parent, WT_PAGE *page) WT_INTL_INDEX_SET(page, replace_index); /* Encourage a race */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_6, TIMING_STRESS_TEST_SLEEP); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_6); /* * Get a generation for this split, mark the parent page. This must be @@ -1259,8 +1235,7 @@ __split_internal_lock( parent = ref->home; /* Encourage races. */ - __page_split_timing_stress( - session, WT_TIMING_STRESS_SPLIT_7, WT_THOUSAND); + __wt_timing_stress(session, WT_TIMING_STRESS_SPLIT_7); /* Page locks live in the modify structure. */ WT_RET(__wt_page_modify_init(session, parent)); diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c index ad7d7d9fcab..24eea097cdf 100644 --- a/src/third_party/wiredtiger/src/btree/bt_sync.c +++ b/src/third_party/wiredtiger/src/btree/bt_sync.c @@ -118,6 +118,7 @@ __sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_PAGE *page; + WT_PAGE_MODIFY *mod; WT_REF *prev, *walk; WT_TXN *txn; uint64_t internal_bytes, internal_pages, leaf_bytes, leaf_pages; @@ -256,9 +257,24 @@ __sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop) if (walk == NULL) break; - /* Skip clean pages. */ - if (!__wt_page_is_modified(walk->page)) + /* + * Skip clean pages, but need to make sure maximum + * transaction ID is always updated. + */ + if (!__wt_page_is_modified(walk->page)) { + if (((mod = walk->page->modify) != NULL) && + mod->rec_max_txn > btree->rec_max_txn) + btree->rec_max_txn = mod->rec_max_txn; +#ifdef HAVE_TIMESTAMPS + if (mod != NULL && __wt_timestamp_cmp( + &btree->rec_max_timestamp, + &mod->rec_max_timestamp) < 0) + __wt_timestamp_set( + &btree->rec_max_timestamp, + &mod->rec_max_timestamp); +#endif continue; + } /* * Take a local reference to the page modify structure diff --git a/src/third_party/wiredtiger/src/cache/cache_las.c b/src/third_party/wiredtiger/src/cache/cache_las.c index 64fe93806e9..54bf8c78171 100644 --- a/src/third_party/wiredtiger/src/cache/cache_las.c +++ b/src/third_party/wiredtiger/src/cache/cache_las.c @@ -19,24 +19,6 @@ WT_SESSION_NO_RECONCILE) /* - * __las_timing_stress -- - * Optionally add delay to simulate the race conditions in lookaside - * sweep for debug purposes. - */ -static void -__las_timing_stress(WT_SESSION_IMPL *session) -{ - WT_CONNECTION_IMPL *conn; - - conn = S2C(session); - - /* Only sleep when lookaside sweep race flag is set. */ - if (FLD_ISSET(conn->timing_stress_flags, - WT_TIMING_STRESS_LOOKASIDE_SWEEP)) - __wt_sleep(0, TIMING_STRESS_TEST_SLEEP); -} - -/* * __las_set_isolation -- * Switch to read-uncommitted. */ @@ -1052,7 +1034,7 @@ __wt_las_sweep(WT_SESSION_IMPL *session) locked = true; /* Encourage a race */ - __las_timing_stress(session); + __wt_timing_stress(session, WT_TIMING_STRESS_LOOKASIDE_SWEEP); /* * When continuing a sweep, position the cursor using the key from the diff --git a/src/third_party/wiredtiger/src/include/misc.h b/src/third_party/wiredtiger/src/include/misc.h index 1d2a5075018..1507e2d07cc 100644 --- a/src/third_party/wiredtiger/src/include/misc.h +++ b/src/third_party/wiredtiger/src/include/misc.h @@ -336,6 +336,3 @@ union __wt_rand_state { continue; \ } #define WT_TAILQ_SAFE_REMOVE_END } - -/* Sleep time to uncover race conditions during timing stress test. */ -#define TIMING_STRESS_TEST_SLEEP (100 * WT_THOUSAND) diff --git a/src/third_party/wiredtiger/src/include/misc.i b/src/third_party/wiredtiger/src/include/misc.i index 0250479af4a..2c380e95ade 100644 --- a/src/third_party/wiredtiger/src/include/misc.i +++ b/src/third_party/wiredtiger/src/include/misc.i @@ -248,3 +248,26 @@ __wt_spin_backoff(uint64_t *yield_count, uint64_t *sleep_usecs) (*sleep_usecs) = WT_MIN((*sleep_usecs) + 100, WT_THOUSAND); __wt_sleep(0, (*sleep_usecs)); } + + /* Maximum stress delay is 1/10 of a second. */ +#define WT_TIMING_STRESS_MAX_DELAY (100000) + +/* + * __wt_timing_stress -- + * Optionally add delay to stress code paths. + */ +static inline void +__wt_timing_stress(WT_SESSION_IMPL *session, u_int flag) +{ + WT_CONNECTION_IMPL *conn; + uint64_t sleep_usecs; + + conn = S2C(session); + + /* Only sleep when the specified configuration flag is set. */ + if (!FLD_ISSET(conn->timing_stress_flags, flag)) + return; + + sleep_usecs = __wt_random(&session->rnd) % WT_TIMING_STRESS_MAX_DELAY; + __wt_sleep(0, sleep_usecs); +} diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index 77e0fa85b0f..92f28d88e62 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -455,11 +455,11 @@ struct __wt_connection_stats { int64_t cursor_insert; int64_t cursor_modify; int64_t cursor_next; + int64_t cursor_restart; int64_t cursor_prev; int64_t cursor_remove; int64_t cursor_reserve; int64_t cursor_reset; - int64_t cursor_restart; int64_t cursor_search; int64_t cursor_search_near; int64_t cursor_sweep_buckets; @@ -783,6 +783,7 @@ struct __wt_dsrc_stats { int64_t compress_raw_ok; int64_t cursor_insert_bulk; int64_t cursor_create; + int64_t cursor_restart; int64_t cursor_insert_bytes; int64_t cursor_remove_bytes; int64_t cursor_update_bytes; @@ -795,7 +796,6 @@ struct __wt_dsrc_stats { int64_t cursor_remove; int64_t cursor_reserve; int64_t cursor_reset; - int64_t cursor_restart; int64_t cursor_search; int64_t cursor_search_near; int64_t cursor_truncate; diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index 2991d6f74e3..159e9e2cf72 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -5213,16 +5213,16 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_CURSOR_MODIFY 1140 /*! cursor: cursor next calls */ #define WT_STAT_CONN_CURSOR_NEXT 1141 +/*! cursor: cursor operation restarted */ +#define WT_STAT_CONN_CURSOR_RESTART 1142 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1142 +#define WT_STAT_CONN_CURSOR_PREV 1143 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1143 +#define WT_STAT_CONN_CURSOR_REMOVE 1144 /*! cursor: cursor reserve calls */ -#define WT_STAT_CONN_CURSOR_RESERVE 1144 +#define WT_STAT_CONN_CURSOR_RESERVE 1145 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1145 -/*! cursor: cursor restarted searches */ -#define WT_STAT_CONN_CURSOR_RESTART 1146 +#define WT_STAT_CONN_CURSOR_RESET 1146 /*! cursor: cursor search calls */ #define WT_STAT_CONN_CURSOR_SEARCH 1147 /*! cursor: cursor search near calls */ @@ -6019,32 +6019,32 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_DSRC_CURSOR_INSERT_BULK 2106 /*! cursor: create calls */ #define WT_STAT_DSRC_CURSOR_CREATE 2107 +/*! cursor: cursor operation restarted */ +#define WT_STAT_DSRC_CURSOR_RESTART 2108 /*! cursor: cursor-insert key and value bytes inserted */ -#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2108 +#define WT_STAT_DSRC_CURSOR_INSERT_BYTES 2109 /*! cursor: cursor-remove key bytes removed */ -#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2109 +#define WT_STAT_DSRC_CURSOR_REMOVE_BYTES 2110 /*! cursor: cursor-update value bytes updated */ -#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2110 +#define WT_STAT_DSRC_CURSOR_UPDATE_BYTES 2111 /*! cursor: cursors cached on close */ -#define WT_STAT_DSRC_CURSOR_CACHE 2111 +#define WT_STAT_DSRC_CURSOR_CACHE 2112 /*! cursor: cursors reused from cache */ -#define WT_STAT_DSRC_CURSOR_REOPEN 2112 +#define WT_STAT_DSRC_CURSOR_REOPEN 2113 /*! cursor: insert calls */ -#define WT_STAT_DSRC_CURSOR_INSERT 2113 +#define WT_STAT_DSRC_CURSOR_INSERT 2114 /*! cursor: modify calls */ -#define WT_STAT_DSRC_CURSOR_MODIFY 2114 +#define WT_STAT_DSRC_CURSOR_MODIFY 2115 /*! cursor: next calls */ -#define WT_STAT_DSRC_CURSOR_NEXT 2115 +#define WT_STAT_DSRC_CURSOR_NEXT 2116 /*! cursor: prev calls */ -#define WT_STAT_DSRC_CURSOR_PREV 2116 +#define WT_STAT_DSRC_CURSOR_PREV 2117 /*! cursor: remove calls */ -#define WT_STAT_DSRC_CURSOR_REMOVE 2117 +#define WT_STAT_DSRC_CURSOR_REMOVE 2118 /*! cursor: reserve calls */ -#define WT_STAT_DSRC_CURSOR_RESERVE 2118 +#define WT_STAT_DSRC_CURSOR_RESERVE 2119 /*! cursor: reset calls */ -#define WT_STAT_DSRC_CURSOR_RESET 2119 -/*! cursor: restarted searches */ -#define WT_STAT_DSRC_CURSOR_RESTART 2120 +#define WT_STAT_DSRC_CURSOR_RESET 2120 /*! cursor: search calls */ #define WT_STAT_DSRC_CURSOR_SEARCH 2121 /*! cursor: search near calls */ diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 749564c2464..909019b3b24 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -111,6 +111,7 @@ static const char * const __stats_dsrc_desc[] = { "compression: raw compression call succeeded", "cursor: bulk-loaded cursor-insert calls", "cursor: create calls", + "cursor: cursor operation restarted", "cursor: cursor-insert key and value bytes inserted", "cursor: cursor-remove key bytes removed", "cursor: cursor-update value bytes updated", @@ -123,7 +124,6 @@ static const char * const __stats_dsrc_desc[] = { "cursor: remove calls", "cursor: reserve calls", "cursor: reset calls", - "cursor: restarted searches", "cursor: search calls", "cursor: search near calls", "cursor: truncate calls", @@ -296,6 +296,7 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->compress_raw_ok = 0; stats->cursor_insert_bulk = 0; stats->cursor_create = 0; + stats->cursor_restart = 0; stats->cursor_insert_bytes = 0; stats->cursor_remove_bytes = 0; stats->cursor_update_bytes = 0; @@ -308,7 +309,6 @@ __wt_stat_dsrc_clear_single(WT_DSRC_STATS *stats) stats->cursor_remove = 0; stats->cursor_reserve = 0; stats->cursor_reset = 0; - stats->cursor_restart = 0; stats->cursor_search = 0; stats->cursor_search_near = 0; stats->cursor_truncate = 0; @@ -482,6 +482,7 @@ __wt_stat_dsrc_aggregate_single( to->compress_raw_ok += from->compress_raw_ok; to->cursor_insert_bulk += from->cursor_insert_bulk; to->cursor_create += from->cursor_create; + to->cursor_restart += from->cursor_restart; to->cursor_insert_bytes += from->cursor_insert_bytes; to->cursor_remove_bytes += from->cursor_remove_bytes; to->cursor_update_bytes += from->cursor_update_bytes; @@ -494,7 +495,6 @@ __wt_stat_dsrc_aggregate_single( to->cursor_remove += from->cursor_remove; to->cursor_reserve += from->cursor_reserve; to->cursor_reset += from->cursor_reset; - to->cursor_restart += from->cursor_restart; to->cursor_search += from->cursor_search; to->cursor_search_near += from->cursor_search_near; to->cursor_truncate += from->cursor_truncate; @@ -701,6 +701,7 @@ __wt_stat_dsrc_aggregate( to->compress_raw_ok += WT_STAT_READ(from, compress_raw_ok); to->cursor_insert_bulk += WT_STAT_READ(from, cursor_insert_bulk); to->cursor_create += WT_STAT_READ(from, cursor_create); + to->cursor_restart += WT_STAT_READ(from, cursor_restart); to->cursor_insert_bytes += WT_STAT_READ(from, cursor_insert_bytes); to->cursor_remove_bytes += WT_STAT_READ(from, cursor_remove_bytes); to->cursor_update_bytes += WT_STAT_READ(from, cursor_update_bytes); @@ -713,7 +714,6 @@ __wt_stat_dsrc_aggregate( to->cursor_remove += WT_STAT_READ(from, cursor_remove); to->cursor_reserve += WT_STAT_READ(from, cursor_reserve); to->cursor_reset += WT_STAT_READ(from, cursor_reset); - to->cursor_restart += WT_STAT_READ(from, cursor_restart); to->cursor_search += WT_STAT_READ(from, cursor_search); to->cursor_search_near += WT_STAT_READ(from, cursor_search_near); to->cursor_truncate += WT_STAT_READ(from, cursor_truncate); @@ -889,11 +889,11 @@ static const char * const __stats_connection_desc[] = { "cursor: cursor insert calls", "cursor: cursor modify calls", "cursor: cursor next calls", + "cursor: cursor operation restarted", "cursor: cursor prev calls", "cursor: cursor remove calls", "cursor: cursor reserve calls", "cursor: cursor reset calls", - "cursor: cursor restarted searches", "cursor: cursor search calls", "cursor: cursor search near calls", "cursor: cursor sweep buckets", @@ -1286,11 +1286,11 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats) stats->cursor_insert = 0; stats->cursor_modify = 0; stats->cursor_next = 0; + stats->cursor_restart = 0; stats->cursor_prev = 0; stats->cursor_remove = 0; stats->cursor_reserve = 0; stats->cursor_reset = 0; - stats->cursor_restart = 0; stats->cursor_search = 0; stats->cursor_search_near = 0; stats->cursor_sweep_buckets = 0; @@ -1726,11 +1726,11 @@ __wt_stat_connection_aggregate( to->cursor_insert += WT_STAT_READ(from, cursor_insert); to->cursor_modify += WT_STAT_READ(from, cursor_modify); to->cursor_next += WT_STAT_READ(from, cursor_next); + to->cursor_restart += WT_STAT_READ(from, cursor_restart); to->cursor_prev += WT_STAT_READ(from, cursor_prev); to->cursor_remove += WT_STAT_READ(from, cursor_remove); to->cursor_reserve += WT_STAT_READ(from, cursor_reserve); to->cursor_reset += WT_STAT_READ(from, cursor_reset); - to->cursor_restart += WT_STAT_READ(from, cursor_restart); to->cursor_search += WT_STAT_READ(from, cursor_search); to->cursor_search_near += WT_STAT_READ(from, cursor_search_near); to->cursor_sweep_buckets += WT_STAT_READ(from, cursor_sweep_buckets); diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c index 10af61caeaf..b0ba6735056 100644 --- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c +++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c @@ -802,14 +802,10 @@ __txn_checkpoint_can_skip(WT_SESSION_IMPL *session, */ WT_RET(__wt_config_gets(session, cfg, "target", &cval)); __wt_config_subinit(session, &targetconf, &cval); - full = __wt_config_next(&targetconf, &k, &v) != 0; - if (fullp != NULL) - *fullp = full; + *fullp = full = __wt_config_next(&targetconf, &k, &v) != 0; WT_RET(__wt_config_gets(session, cfg, "use_timestamp", &cval)); - use_timestamp = cval.val != 0; - if (use_timestampp != NULL) - *use_timestampp = use_timestamp; + *use_timestampp = use_timestamp = cval.val != 0; /* Never skip non-full checkpoints */ if (!full) |