diff options
author | Dan Pasette <dan@10gen.com> | 2015-08-14 14:11:49 -0400 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2015-08-14 16:47:42 -0400 |
commit | ad9c7c52c50b88b090f7eccaeae151436e1e1e72 (patch) | |
tree | 5c39705a8a86c149e98982e1b068ccb38999545f | |
parent | 4fc7afa53f054cdff19d38067808564391a3d5bf (diff) | |
download | mongo-ad9c7c52c50b88b090f7eccaeae151436e1e1e72.tar.gz |
Import wiredtiger-wiredtiger-mongodb-3.0.5-37-g009216b.tar.gz from wiredtiger branch mongodb-3.0
-rw-r--r-- | src/third_party/wiredtiger/dist/s_define | 15 | ||||
-rw-r--r-- | src/third_party/wiredtiger/dist/s_define.list | 60 | ||||
-rw-r--r-- | src/third_party/wiredtiger/dist/stat_data.py | 12 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_stat.c | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_sweep.c | 49 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/connection.h | 3 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/dhandle.h | 6 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/stat.h | 10 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/wiredtiger.in | 168 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/lsm/lsm_manager.c | 14 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/os_posix/os_open.c | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/session/session_dhandle.c | 122 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/support/stat.c | 25 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_nsnap.c | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/tools/wtstats/stat_data.py | 2 |
15 files changed, 250 insertions, 248 deletions
diff --git a/src/third_party/wiredtiger/dist/s_define b/src/third_party/wiredtiger/dist/s_define index 7809bf14918..77673bdcdf9 100644 --- a/src/third_party/wiredtiger/dist/s_define +++ b/src/third_party/wiredtiger/dist/s_define @@ -4,18 +4,23 @@ t=__wt.$$ trap 'rm -f $t; exit 0' 0 1 2 3 13 15 -# List of files to search. +# List of source files to search. l=`sed -e 's,#.*,,' -e '/^$/d' -e 's,^,../,' filelist` l="$l `echo ../src/include/*.i ../src/utilities/*.c ../test/*/*.c`" +# List of include files for source #defines. +# Ignore the queue.h file, we don't use most of it. +dl="../src/include/*.[hi] ../src/include/*.in" +dl=`echo $dl | sed 's/ [^ ]*queue.h//'` + ( # Copy out the list of #defines we don't use, but it's OK. sed -e '/^$/d' -e '/^#/d' < s_define.list -# Get the list of #defines. -# Ignore the list of configuration objects -# Ignore the list of statistic "keys" generated for applications. -search=`cat ../src/include/*.[hi] ../src/include/*.in | +# Search the list of include files for #defines +# Ignore configuration objects #defines +# Ignore statistic "keys" generated for applications #defines +search=`cat $dl | sed -e '/configuration section: BEGIN/,/configuration section: END/d' \ -e '/Statistics section: BEGIN/,/Statistics section: END/d' | egrep '^#define' | diff --git a/src/third_party/wiredtiger/dist/s_define.list b/src/third_party/wiredtiger/dist/s_define.list index 4924a1935ae..1bceb6a54fb 100644 --- a/src/third_party/wiredtiger/dist/s_define.list +++ b/src/third_party/wiredtiger/dist/s_define.list @@ -73,63 +73,3 @@ __WT_ATOMIC_CAS_VAL __WT_ATOMIC_FETCH_ADD __WT_ATOMIC_STORE __WT_ATOMIC_SUB - -# List of queue.h #defines that are "unused", but it's OK. -LIST_EMPTY -LIST_ENTRY -LIST_FIRST -LIST_FOREACH -LIST_HEAD -LIST_HEAD_INITIALIZER -LIST_INIT -LIST_INSERT_AFTER -LIST_INSERT_BEFORE -LIST_INSERT_HEAD -LIST_NEXT -LIST_REMOVE -QMD_TRACE_ELEM -QMD_TRACE_HEAD -QUEUE_MACRO_DEBUG -SLIST_EMPTY -SLIST_ENTRY -SLIST_FIRST -SLIST_FOREACH -SLIST_FOREACH_PREVPTR -SLIST_HEAD -SLIST_HEAD_INITIALIZER -SLIST_INIT -SLIST_INSERT_AFTER -SLIST_INSERT_HEAD -SLIST_NEXT -SLIST_REMOVE -SLIST_REMOVE_HEAD -STAILQ_CONCAT -STAILQ_EMPTY -STAILQ_ENTRY -STAILQ_FIRST -STAILQ_FOREACH -STAILQ_HEAD -STAILQ_HEAD_INITIALIZER -STAILQ_INIT -STAILQ_INSERT_AFTER -STAILQ_INSERT_HEAD -STAILQ_INSERT_TAIL -STAILQ_LAST -STAILQ_NEXT -STAILQ_REMOVE -STAILQ_REMOVE_HEAD -STAILQ_REMOVE_HEAD_UNTIL -TAILQ_CONCAT -TAILQ_EMPTY -TAILQ_ENTRY -TAILQ_FOREACH_REVERSE -TAILQ_HEAD -TAILQ_HEAD_INITIALIZER -TAILQ_INSERT_AFTER -TAILQ_INSERT_BEFORE -TAILQ_LAST -TAILQ_NEXT -TAILQ_PREV -TRACEBUF -TRASHIT -_DB_QUEUE_H_ diff --git a/src/third_party/wiredtiger/dist/stat_data.py b/src/third_party/wiredtiger/dist/stat_data.py index 6e2efb66eb6..d27840d3fbc 100644 --- a/src/third_party/wiredtiger/dist/stat_data.py +++ b/src/third_party/wiredtiger/dist/stat_data.py @@ -205,10 +205,14 @@ connection_stats = [ ########################################## # Dhandle statistics ########################################## - DhandleStat('dh_conn_handles', 'connection dhandles swept'), - DhandleStat('dh_conn_ref', 'connection candidate referenced'), - DhandleStat('dh_conn_sweeps', 'connection sweeps'), - DhandleStat('dh_conn_tod', 'connection time-of-death sets'), + DhandleStat('dh_conn_handle_count', + 'connection data handles currently active', 'no_clear,no_scale'), + DhandleStat('dh_sweep_close', 'connection sweep dhandles closed'), + DhandleStat('dh_sweep_remove', + 'connection sweep dhandles removed from hash list'), + DhandleStat('dh_sweep_ref', 'connection sweep candidate became referenced'), + DhandleStat('dh_sweep_tod', 'connection sweep time-of-death sets'), + DhandleStat('dh_sweeps', 'connection sweeps'), DhandleStat('dh_session_handles', 'session dhandles swept'), DhandleStat('dh_session_sweeps', 'session sweep attempts'), diff --git a/src/third_party/wiredtiger/src/conn/conn_stat.c b/src/third_party/wiredtiger/src/conn/conn_stat.c index 0d008939d8c..07ebfacface 100644 --- a/src/third_party/wiredtiger/src/conn/conn_stat.c +++ b/src/third_party/wiredtiger/src/conn/conn_stat.c @@ -45,6 +45,10 @@ __wt_conn_stat_init(WT_SESSION_IMPL *session) __wt_async_stats_update(session); __wt_cache_stats_update(session); __wt_txn_stats_update(session); + + WT_CONN_STAT(session, dh_conn_handle_count) = + S2C(session)->dhandle_count; + WT_CONN_STAT(session, file_open) = S2C(session)->open_file_count; } /* diff --git a/src/third_party/wiredtiger/src/conn/conn_sweep.c b/src/third_party/wiredtiger/src/conn/conn_sweep.c index 4b925094c7f..061d70221c7 100644 --- a/src/third_party/wiredtiger/src/conn/conn_sweep.c +++ b/src/third_party/wiredtiger/src/conn/conn_sweep.c @@ -8,6 +8,10 @@ #include "wt_internal.h" +#define WT_DHANDLE_CAN_DISCARD(dhandle) \ + (!F_ISSET(dhandle, WT_DHANDLE_EXCLUSIVE | WT_DHANDLE_OPEN) && \ + dhandle->session_inuse == 0 && dhandle->session_ref == 0) + /* * __sweep_mark -- * Mark idle handles with a time of death, and note if we see dead @@ -34,13 +38,17 @@ __sweep_mark(WT_SESSION_IMPL *session, time_t now) if (dhandle->session_inuse > 1) dhandle->timeofdeath = 0; - if (F_ISSET(dhandle, WT_DHANDLE_DEAD) || - dhandle->session_inuse != 0 || + /* + * If the handle is open exclusive or currently in use, or the + * time of death is already set, move on. + */ + if (F_ISSET(dhandle, WT_DHANDLE_EXCLUSIVE) || + dhandle->session_inuse > 0 || dhandle->timeofdeath != 0) continue; dhandle->timeofdeath = now; - WT_STAT_FAST_CONN_INCR(session, dh_conn_tod); + WT_STAT_FAST_CONN_INCR(session, dh_sweep_tod); } return (0); @@ -125,7 +133,7 @@ __sweep_expire(WT_SESSION_IMPL *session, time_t now) break; if (WT_IS_METADATA(dhandle) || - F_ISSET(dhandle, WT_DHANDLE_DEAD) || + !F_ISSET(dhandle, WT_DHANDLE_OPEN) || dhandle->session_inuse != 0 || dhandle->timeofdeath == 0 || now <= dhandle->timeofdeath + conn->sweep_idle_time) @@ -145,8 +153,7 @@ __sweep_expire(WT_SESSION_IMPL *session, time_t now) * Discard pages from dead trees. */ static int -__sweep_discard_trees( - WT_SESSION_IMPL *session, time_t now, u_int *dead_handlesp) +__sweep_discard_trees(WT_SESSION_IMPL *session, u_int *dead_handlesp) { WT_CONNECTION_IMPL *conn; WT_DATA_HANDLE *dhandle; @@ -157,9 +164,7 @@ __sweep_discard_trees( *dead_handlesp = 0; TAILQ_FOREACH(dhandle, &conn->dhqh, q) { - if (!F_ISSET(dhandle, WT_DHANDLE_OPEN | WT_DHANDLE_EXCLUSIVE) && - (dhandle->timeofdiscard == 0 || - now <= dhandle->timeofdiscard + conn->sweep_idle_time)) + if (WT_DHANDLE_CAN_DISCARD(dhandle)) ++*dead_handlesp; if (!F_ISSET(dhandle, WT_DHANDLE_OPEN) || @@ -172,9 +177,10 @@ __sweep_discard_trees( /* We closed the btree handle. */ if (ret == 0) { - WT_STAT_FAST_CONN_INCR(session, dh_conn_handles); + WT_STAT_FAST_CONN_INCR(session, dh_sweep_close); ++*dead_handlesp; - } + } else + WT_STAT_FAST_CONN_INCR(session, dh_sweep_ref); WT_RET_BUSY_OK(ret); } @@ -198,8 +204,7 @@ __sweep_remove_one(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle) * If there are no longer any references to the handle in any * sessions, attempt to discard it. */ - if (F_ISSET(dhandle, WT_DHANDLE_EXCLUSIVE | WT_DHANDLE_OPEN) || - dhandle->session_inuse != 0 || dhandle->session_ref != 0) + if (!WT_DHANDLE_CAN_DISCARD(dhandle)) WT_ERR(EBUSY); WT_WITH_DHANDLE(session, dhandle, @@ -221,7 +226,7 @@ err: WT_TRET(__wt_writeunlock(session, dhandle->rwlock)); * Remove closed handles from the connection list. */ static int -__sweep_remove_handles(WT_SESSION_IMPL *session, time_t now) +__sweep_remove_handles(WT_SESSION_IMPL *session) { WT_CONNECTION_IMPL *conn; WT_DATA_HANDLE *dhandle, *dhandle_next; @@ -235,19 +240,15 @@ __sweep_remove_handles(WT_SESSION_IMPL *session, time_t now) dhandle_next = TAILQ_NEXT(dhandle, q); if (WT_IS_METADATA(dhandle)) continue; - if (F_ISSET(dhandle, WT_DHANDLE_EXCLUSIVE | WT_DHANDLE_OPEN) || - dhandle->session_inuse != 0 || dhandle->session_ref != 0) - continue; - if (dhandle->timeofdiscard != 0 && - now <= dhandle->timeofdiscard + conn->sweep_idle_time) + if (!WT_DHANDLE_CAN_DISCARD(dhandle)) continue; WT_WITH_DHANDLE_LOCK(session, ret = __sweep_remove_one(session, dhandle)); if (ret == 0) - WT_STAT_FAST_CONN_INCR(session, dh_conn_ref); + WT_STAT_FAST_CONN_INCR(session, dh_sweep_remove); else - dhandle->timeofdiscard = now; + WT_STAT_FAST_CONN_INCR(session, dh_sweep_ref); WT_RET_BUSY_OK(ret); } @@ -280,7 +281,7 @@ __sweep_server(void *arg) (uint64_t)conn->sweep_interval * WT_MILLION)); WT_ERR(__wt_seconds(session, &now)); - WT_STAT_FAST_CONN_INCR(session, dh_conn_sweeps); + WT_STAT_FAST_CONN_INCR(session, dh_sweeps); /* * Mark handles with a time of death, and report whether any @@ -298,10 +299,10 @@ __sweep_server(void *arg) conn->open_btree_count >= conn->sweep_handles_min) WT_ERR(__sweep_expire(session, now)); - WT_ERR(__sweep_discard_trees(session, now, &dead_handles)); + WT_ERR(__sweep_discard_trees(session, &dead_handles)); if (dead_handles > 0) - WT_ERR(__sweep_remove_handles(session, now)); + WT_ERR(__sweep_remove_handles(session)); } if (0) { diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h index 34eb704e5dd..ef813b18849 100644 --- a/src/third_party/wiredtiger/src/include/connection.h +++ b/src/third_party/wiredtiger/src/include/connection.h @@ -86,11 +86,13 @@ struct __wt_named_extractor { #define WT_CONN_DHANDLE_INSERT(conn, dhandle, bucket) do { \ TAILQ_INSERT_HEAD(&(conn)->dhqh, dhandle, q); \ TAILQ_INSERT_HEAD(&(conn)->dhhash[bucket], dhandle, hashq); \ + ++conn->dhandle_count; \ } while (0) #define WT_CONN_DHANDLE_REMOVE(conn, dhandle, bucket) do { \ TAILQ_REMOVE(&(conn)->dhqh, dhandle, q); \ TAILQ_REMOVE(&(conn)->dhhash[bucket], dhandle, hashq); \ + --conn->dhandle_count; \ } while (0) /* @@ -198,6 +200,7 @@ struct __wt_connection_impl { TAILQ_HEAD(__wt_blockhash, __wt_block) blockhash[WT_HASH_ARRAY_SIZE]; TAILQ_HEAD(__wt_block_qh, __wt_block) blockqh; + u_int dhandle_count; /* Locked: handles in the queue */ u_int open_btree_count; /* Locked: open writable btree count */ uint32_t next_file_id; /* Locked: file ID counter */ uint32_t open_file_count; /* Atomic: open file handle count */ diff --git a/src/third_party/wiredtiger/src/include/dhandle.h b/src/third_party/wiredtiger/src/include/dhandle.h index e7231616c12..82797be0d58 100644 --- a/src/third_party/wiredtiger/src/include/dhandle.h +++ b/src/third_party/wiredtiger/src/include/dhandle.h @@ -28,6 +28,11 @@ */ #define WT_SAVE_DHANDLE(s, e) WT_WITH_DHANDLE(s, (s)->dhandle, e) +/* Check if a handle is inactive. */ +#define WT_DHANDLE_INACTIVE(dhandle) \ + (F_ISSET(dhandle, WT_DHANDLE_DEAD) || \ + !F_ISSET(dhandle, WT_DHANDLE_EXCLUSIVE | WT_DHANDLE_OPEN)) + /* * WT_DATA_HANDLE -- * A handle for a generic named data source. @@ -45,7 +50,6 @@ struct __wt_data_handle { uint32_t session_ref; /* Sessions referencing this handle */ int32_t session_inuse; /* Sessions using this handle */ time_t timeofdeath; /* Use count went to 0 */ - time_t timeofdiscard; /* Time of last failed discard */ uint64_t name_hash; /* Hash of name */ const char *name; /* Object name as a URI */ diff --git a/src/third_party/wiredtiger/src/include/stat.h b/src/third_party/wiredtiger/src/include/stat.h index 2acaad39b0e..aab251f0e31 100644 --- a/src/third_party/wiredtiger/src/include/stat.h +++ b/src/third_party/wiredtiger/src/include/stat.h @@ -196,12 +196,14 @@ struct __wt_connection_stats { WT_STATS cursor_search; WT_STATS cursor_search_near; WT_STATS cursor_update; - WT_STATS dh_conn_handles; - WT_STATS dh_conn_ref; - WT_STATS dh_conn_sweeps; - WT_STATS dh_conn_tod; + WT_STATS dh_conn_handle_count; WT_STATS dh_session_handles; WT_STATS dh_session_sweeps; + WT_STATS dh_sweep_close; + WT_STATS dh_sweep_ref; + WT_STATS dh_sweep_remove; + WT_STATS dh_sweep_tod; + WT_STATS dh_sweeps; WT_STATS file_open; WT_STATS log_buffer_size; WT_STATS log_bytes_payload; diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index ddb738e8fb8..ab03d2d27ad 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -3333,162 +3333,166 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1062 /*! cursor: cursor update calls */ #define WT_STAT_CONN_CURSOR_UPDATE 1063 -/*! data-handle: connection dhandles swept */ -#define WT_STAT_CONN_DH_CONN_HANDLES 1064 -/*! data-handle: connection candidate referenced */ -#define WT_STAT_CONN_DH_CONN_REF 1065 -/*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_CONN_SWEEPS 1066 -/*! data-handle: connection time-of-death sets */ -#define WT_STAT_CONN_DH_CONN_TOD 1067 +/*! data-handle: connection data handles currently active */ +#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1064 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1068 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1065 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1069 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1066 +/*! data-handle: connection sweep dhandles closed */ +#define WT_STAT_CONN_DH_SWEEP_CLOSE 1067 +/*! data-handle: connection sweep candidate became referenced */ +#define WT_STAT_CONN_DH_SWEEP_REF 1068 +/*! data-handle: connection sweep dhandles removed from hash list */ +#define WT_STAT_CONN_DH_SWEEP_REMOVE 1069 +/*! data-handle: connection sweep time-of-death sets */ +#define WT_STAT_CONN_DH_SWEEP_TOD 1070 +/*! data-handle: connection sweeps */ +#define WT_STAT_CONN_DH_SWEEPS 1071 /*! connection: files currently open */ -#define WT_STAT_CONN_FILE_OPEN 1070 +#define WT_STAT_CONN_FILE_OPEN 1072 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1071 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1073 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1072 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1074 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1073 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1075 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1074 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1076 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1075 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1077 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1076 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1078 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1077 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1079 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1078 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1080 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1079 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1081 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1080 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1082 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1081 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1083 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1082 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1084 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1083 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1085 /*! log: log read operations */ -#define WT_STAT_CONN_LOG_READS 1084 +#define WT_STAT_CONN_LOG_READS 1086 /*! log: log release advances write LSN */ -#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1085 +#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1087 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1086 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1088 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1087 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1089 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1088 +#define WT_STAT_CONN_LOG_SCANS 1090 /*! log: consolidated slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1089 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1091 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1090 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1092 /*! log: consolidated slot joins */ -#define WT_STAT_CONN_LOG_SLOT_JOINS 1091 +#define WT_STAT_CONN_LOG_SLOT_JOINS 1093 /*! log: consolidated slot join races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1092 +#define WT_STAT_CONN_LOG_SLOT_RACES 1094 /*! log: slots selected for switching that were unavailable */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1093 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1095 /*! log: record size exceeded maximum */ -#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1094 +#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1096 /*! log: failed to find a slot large enough for record */ -#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1095 +#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1097 /*! log: consolidated slot join transitions */ -#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1096 +#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1098 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1097 +#define WT_STAT_CONN_LOG_SYNC 1099 /*! log: log sync_dir operations */ -#define WT_STAT_CONN_LOG_SYNC_DIR 1098 +#define WT_STAT_CONN_LOG_SYNC_DIR 1100 /*! log: log server thread advances write LSN */ -#define WT_STAT_CONN_LOG_WRITE_LSN 1099 +#define WT_STAT_CONN_LOG_WRITE_LSN 1101 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1100 +#define WT_STAT_CONN_LOG_WRITES 1102 /*! LSM: sleep for LSM checkpoint throttle */ -#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1101 +#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1103 /*! LSM: sleep for LSM merge throttle */ -#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1102 +#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1104 /*! LSM: rows merged in an LSM tree */ -#define WT_STAT_CONN_LSM_ROWS_MERGED 1103 +#define WT_STAT_CONN_LSM_ROWS_MERGED 1105 /*! LSM: application work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1104 +#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1106 /*! LSM: merge work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1105 +#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1107 /*! LSM: tree queue hit maximum */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1106 +#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1108 /*! LSM: switch work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1107 +#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1109 /*! LSM: tree maintenance operations scheduled */ -#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1108 +#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1110 /*! LSM: tree maintenance operations discarded */ -#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1109 +#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1111 /*! LSM: tree maintenance operations executed */ -#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1110 +#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1112 /*! connection: memory allocations */ -#define WT_STAT_CONN_MEMORY_ALLOCATION 1111 +#define WT_STAT_CONN_MEMORY_ALLOCATION 1113 /*! connection: memory frees */ -#define WT_STAT_CONN_MEMORY_FREE 1112 +#define WT_STAT_CONN_MEMORY_FREE 1114 /*! connection: memory re-allocations */ -#define WT_STAT_CONN_MEMORY_GROW 1113 +#define WT_STAT_CONN_MEMORY_GROW 1115 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1114 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1116 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1115 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1117 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1116 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1118 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1117 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1119 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1118 +#define WT_STAT_CONN_PAGE_SLEEP 1120 /*! connection: total read I/Os */ -#define WT_STAT_CONN_READ_IO 1119 +#define WT_STAT_CONN_READ_IO 1121 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1120 +#define WT_STAT_CONN_REC_PAGES 1122 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1121 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1123 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1122 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1124 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1123 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1125 /*! connection: pthread mutex shared lock read-lock calls */ -#define WT_STAT_CONN_RWLOCK_READ 1124 +#define WT_STAT_CONN_RWLOCK_READ 1126 /*! connection: pthread mutex shared lock write-lock calls */ -#define WT_STAT_CONN_RWLOCK_WRITE 1125 +#define WT_STAT_CONN_RWLOCK_WRITE 1127 /*! session: open cursor count */ -#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1126 +#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1128 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1127 +#define WT_STAT_CONN_SESSION_OPEN 1129 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1128 +#define WT_STAT_CONN_TXN_BEGIN 1130 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1129 +#define WT_STAT_CONN_TXN_CHECKPOINT 1131 /*! transaction: transaction checkpoint generation */ -#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1130 +#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1132 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1131 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1133 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1132 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1134 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1133 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1135 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1134 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1136 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1135 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1137 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1136 +#define WT_STAT_CONN_TXN_COMMIT 1138 /*! transaction: transaction failures due to cache overflow */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1137 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1139 /*! transaction: transaction range of IDs currently pinned by a checkpoint */ -#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1138 +#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1140 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1139 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1141 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1140 +#define WT_STAT_CONN_TXN_ROLLBACK 1142 /*! connection: total write I/Os */ -#define WT_STAT_CONN_WRITE_IO 1141 +#define WT_STAT_CONN_WRITE_IO 1143 /*! * @} diff --git a/src/third_party/wiredtiger/src/lsm/lsm_manager.c b/src/third_party/wiredtiger/src/lsm/lsm_manager.c index 84c509158d1..1ea41f24ee2 100644 --- a/src/third_party/wiredtiger/src/lsm/lsm_manager.c +++ b/src/third_party/wiredtiger/src/lsm/lsm_manager.c @@ -274,7 +274,7 @@ __wt_lsm_manager_destroy(WT_SESSION_IMPL *session) WT_CONNECTION_IMPL *conn; WT_DECL_RET; WT_LSM_MANAGER *manager; - WT_LSM_WORK_UNIT *current, *next; + WT_LSM_WORK_UNIT *current; WT_SESSION *wt_session; uint32_t i; uint64_t removed; @@ -298,23 +298,17 @@ __wt_lsm_manager_destroy(WT_SESSION_IMPL *session) manager->lsm_worker_cookies[0].tid = 0; /* Release memory from any operations left on the queue. */ - for (current = TAILQ_FIRST(&manager->switchqh); - current != NULL; current = next) { - next = TAILQ_NEXT(current, q); + while ((current = TAILQ_FIRST(&manager->switchqh)) != NULL) { TAILQ_REMOVE(&manager->switchqh, current, q); ++removed; __wt_lsm_manager_free_work_unit(session, current); } - for (current = TAILQ_FIRST(&manager->appqh); - current != NULL; current = next) { - next = TAILQ_NEXT(current, q); + while ((current = TAILQ_FIRST(&manager->appqh)) != NULL) { TAILQ_REMOVE(&manager->appqh, current, q); ++removed; __wt_lsm_manager_free_work_unit(session, current); } - for (current = TAILQ_FIRST(&manager->managerqh); - current != NULL; current = next) { - next = TAILQ_NEXT(current, q); + while ((current = TAILQ_FIRST(&manager->managerqh)) != NULL) { TAILQ_REMOVE(&manager->managerqh, current, q); ++removed; __wt_lsm_manager_free_work_unit(session, current); diff --git a/src/third_party/wiredtiger/src/os_posix/os_open.c b/src/third_party/wiredtiger/src/os_posix/os_open.c index d8afbf88f87..b3dc8f1db27 100644 --- a/src/third_party/wiredtiger/src/os_posix/os_open.c +++ b/src/third_party/wiredtiger/src/os_posix/os_open.c @@ -177,7 +177,7 @@ setupfh: } if (!matched) { WT_CONN_FILE_INSERT(conn, fh, bucket); - WT_STAT_ATOMIC_INCR(&conn->stats, file_open); + (void)WT_ATOMIC_ADD4(conn->open_file_count, 1); *fhp = fh; } @@ -223,7 +223,7 @@ __wt_close(WT_SESSION_IMPL *session, WT_FH **fhp) /* Remove from the list. */ bucket = fh->name_hash % WT_HASH_ARRAY_SIZE; WT_CONN_FILE_REMOVE(conn, fh, bucket); - WT_STAT_ATOMIC_DECR(&conn->stats, file_open); + (void)WT_ATOMIC_SUB4(conn->open_file_count, 1); __wt_spin_unlock(session, &conn->fh_lock); diff --git a/src/third_party/wiredtiger/src/session/session_dhandle.c b/src/third_party/wiredtiger/src/session/session_dhandle.c index 731e54884db..7488d9115f0 100644 --- a/src/third_party/wiredtiger/src/session/session_dhandle.c +++ b/src/third_party/wiredtiger/src/session/session_dhandle.c @@ -38,6 +38,61 @@ __session_add_dhandle( } /* + * __session_discard_dhandle -- + * Remove a data handle from the session cache. + */ +static void +__session_discard_dhandle( + WT_SESSION_IMPL *session, WT_DATA_HANDLE_CACHE *dhandle_cache) +{ + uint64_t bucket; + + bucket = dhandle_cache->dhandle->name_hash % WT_HASH_ARRAY_SIZE; + TAILQ_REMOVE(&session->dhandles, dhandle_cache, q); + TAILQ_REMOVE(&session->dhhash[bucket], dhandle_cache, hashq); + + (void)WT_ATOMIC_SUB4(dhandle_cache->dhandle->session_ref, 1); + + __wt_overwrite_and_free(session, dhandle_cache); +} + +/* + * __session_find_dhandle -- + * Search for a data handle in the session cache. + */ +static void +__session_find_dhandle(WT_SESSION_IMPL *session, + const char *uri, const char *checkpoint, + WT_DATA_HANDLE_CACHE **dhandle_cachep) +{ + WT_DATA_HANDLE *dhandle; + WT_DATA_HANDLE_CACHE *dhandle_cache; + uint64_t bucket; + + dhandle = NULL; + + bucket = __wt_hash_city64(uri, strlen(uri)) % WT_HASH_ARRAY_SIZE; +retry: TAILQ_FOREACH(dhandle_cache, &session->dhhash[bucket], hashq) { + dhandle = dhandle_cache->dhandle; + if (WT_DHANDLE_INACTIVE(dhandle) && !WT_IS_METADATA(dhandle)) { + __session_discard_dhandle(session, dhandle_cache); + /* We deleted our entry, retry from the start. */ + goto retry; + } + + if (strcmp(uri, dhandle->name) != 0) + continue; + if (checkpoint == NULL && dhandle->checkpoint == NULL) + break; + if (checkpoint != NULL && dhandle->checkpoint != NULL && + strcmp(checkpoint, dhandle->checkpoint) == 0) + break; + } + + *dhandle_cachep = dhandle_cache; +} + +/* * __wt_session_lock_dhandle -- * Try to lock a handle that is cached in this session. This is the fast * path that tries to lock a handle without the need for the schema lock. @@ -134,6 +189,7 @@ __wt_session_release_btree(WT_SESSION_IMPL *session) enum { NOLOCK, READLOCK, WRITELOCK } locked; WT_BTREE *btree; WT_DATA_HANDLE *dhandle; + WT_DATA_HANDLE_CACHE *dhandle_cache; WT_DECL_RET; btree = S2BT(session); @@ -144,6 +200,13 @@ __wt_session_release_btree(WT_SESSION_IMPL *session) * If we had special flags set, close the handle so that future access * can get a handle without special flags. */ + if (F_ISSET(dhandle, WT_DHANDLE_DISCARD | WT_DHANDLE_DISCARD_FORCE)) { + __session_find_dhandle(session, + dhandle->name, dhandle->checkpoint, &dhandle_cache); + if (dhandle_cache != NULL) + __session_discard_dhandle(session, dhandle_cache); + } + if (F_ISSET(dhandle, WT_DHANDLE_DISCARD_FORCE)) { WT_WITH_DHANDLE_LOCK(session, ret = __wt_conn_btree_sync_and_close(session, 0, 1)); @@ -232,25 +295,6 @@ retry: WT_RET(__wt_meta_checkpoint_last_name( } /* - * __session_discard_btree -- - * Discard our reference to the btree. - */ -static void -__session_discard_btree( - WT_SESSION_IMPL *session, WT_DATA_HANDLE_CACHE *dhandle_cache) -{ - uint64_t bucket; - - bucket = dhandle_cache->dhandle->name_hash % WT_HASH_ARRAY_SIZE; - TAILQ_REMOVE(&session->dhandles, dhandle_cache, q); - TAILQ_REMOVE(&session->dhhash[bucket], dhandle_cache, hashq); - - (void)WT_ATOMIC_SUB4(dhandle_cache->dhandle->session_ref, 1); - - __wt_overwrite_and_free(session, dhandle_cache); -} - -/* * __wt_session_close_cache -- * Close any cached handles in a session. */ @@ -260,7 +304,7 @@ __wt_session_close_cache(WT_SESSION_IMPL *session) WT_DATA_HANDLE_CACHE *dhandle_cache; while ((dhandle_cache = TAILQ_FIRST(&session->dhandles)) != NULL) - __session_discard_btree(session, dhandle_cache); + __session_discard_dhandle(session, dhandle_cache); } /* @@ -294,10 +338,12 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session) dhandle = dhandle_cache->dhandle; if (dhandle != session->dhandle && dhandle->session_inuse == 0 && - (F_ISSET(dhandle, WT_DHANDLE_DEAD) || - now - dhandle->timeofdeath > conn->sweep_idle_time)) { + (WT_DHANDLE_INACTIVE(dhandle) || + (dhandle->timeofdeath != 0 && + now - dhandle->timeofdeath > conn->sweep_idle_time))) { WT_STAT_FAST_CONN_INCR(session, dh_session_handles); - __session_discard_btree(session, dhandle_cache); + WT_ASSERT(session, !WT_IS_METADATA(dhandle)); + __session_discard_dhandle(session, dhandle_cache); } dhandle_cache = dhandle_cache_next; } @@ -305,18 +351,19 @@ __session_dhandle_sweep(WT_SESSION_IMPL *session) } /* - * __session_dhandle_find -- + * __session_find_shared_dhandle -- * Search for a data handle in the connection and add it to a session's * cache. Since the data handle isn't locked, this must be called holding * the handle list lock, and we must increment the handle's reference * count before releasing it. */ static int -__session_dhandle_find(WT_SESSION_IMPL *session, +__session_find_shared_dhandle(WT_SESSION_IMPL *session, const char *uri, const char *checkpoint, uint32_t flags) { WT_RET(__wt_conn_dhandle_find(session, uri, checkpoint, flags)); - return (__session_add_dhandle(session, NULL)); + (void)WT_ATOMIC_ADD4(session->dhandle->session_ref, 1); + return (0); } /* @@ -330,35 +377,22 @@ __wt_session_get_btree(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle; WT_DATA_HANDLE_CACHE *dhandle_cache; WT_DECL_RET; - uint64_t bucket; int is_dead; WT_ASSERT(session, !F_ISSET(session, WT_SESSION_NO_DATA_HANDLES)); WT_ASSERT(session, !LF_ISSET(WT_DHANDLE_HAVE_REF)); - dhandle = NULL; - - bucket = __wt_hash_city64(uri, strlen(uri)) % WT_HASH_ARRAY_SIZE; - TAILQ_FOREACH(dhandle_cache, &session->dhhash[bucket], hashq) { - dhandle = dhandle_cache->dhandle; - if (strcmp(uri, dhandle->name) != 0) - continue; - if (checkpoint == NULL && dhandle->checkpoint == NULL) - break; - if (checkpoint != NULL && dhandle->checkpoint != NULL && - strcmp(checkpoint, dhandle->checkpoint) == 0) - break; - } + __session_find_dhandle(session, uri, checkpoint, &dhandle_cache); if (dhandle_cache != NULL) - session->dhandle = dhandle; + session->dhandle = dhandle = dhandle_cache->dhandle; else { /* * We didn't find a match in the session cache, now search the * shared handle list and cache any handle we find. */ WT_WITH_DHANDLE_LOCK(session, ret = - __session_dhandle_find(session, uri, checkpoint, flags)); + __session_find_shared_dhandle(session, uri, checkpoint, flags)); dhandle = (ret == 0) ? session->dhandle : NULL; WT_RET_NOTFOUND_OK(ret); } @@ -386,7 +420,7 @@ __wt_session_get_btree(WT_SESSION_IMPL *session, /* If we found the handle and it isn't dead, reopen it. */ if (is_dead) { - __session_discard_btree(session, dhandle_cache); + __session_discard_dhandle(session, dhandle_cache); dhandle_cache = NULL; session->dhandle = dhandle = NULL; } else @@ -413,7 +447,7 @@ retry: is_dead = 0; if (is_dead) { if (dhandle_cache != NULL) - __session_discard_btree(session, dhandle_cache); + __session_discard_dhandle(session, dhandle_cache); dhandle_cache = NULL; session->dhandle = dhandle = NULL; LF_CLR(WT_DHANDLE_HAVE_REF); diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c index 8db47646b11..476566b227f 100644 --- a/src/third_party/wiredtiger/src/support/stat.c +++ b/src/third_party/wiredtiger/src/support/stat.c @@ -433,11 +433,17 @@ __wt_stat_init_connection_stats(WT_CONNECTION_STATS *stats) stats->cursor_search.desc = "cursor: cursor search calls"; stats->cursor_search_near.desc = "cursor: cursor search near calls"; stats->cursor_update.desc = "cursor: cursor update calls"; - stats->dh_conn_ref.desc = - "data-handle: connection candidate referenced"; - stats->dh_conn_handles.desc = "data-handle: connection dhandles swept"; - stats->dh_conn_sweeps.desc = "data-handle: connection sweeps"; - stats->dh_conn_tod.desc = "data-handle: connection time-of-death sets"; + stats->dh_conn_handle_count.desc = + "data-handle: connection data handles currently active"; + stats->dh_sweep_ref.desc = + "data-handle: connection sweep candidate became referenced"; + stats->dh_sweep_close.desc = + "data-handle: connection sweep dhandles closed"; + stats->dh_sweep_remove.desc = + "data-handle: connection sweep dhandles removed from hash list"; + stats->dh_sweep_tod.desc = + "data-handle: connection sweep time-of-death sets"; + stats->dh_sweeps.desc = "data-handle: connection sweeps"; stats->dh_session_handles.desc = "data-handle: session dhandles swept"; stats->dh_session_sweeps.desc = "data-handle: session sweep attempts"; stats->log_slot_closes.desc = "log: consolidated slot closures"; @@ -610,10 +616,11 @@ __wt_stat_refresh_connection_stats(void *stats_arg) stats->cursor_search.v = 0; stats->cursor_search_near.v = 0; stats->cursor_update.v = 0; - stats->dh_conn_ref.v = 0; - stats->dh_conn_handles.v = 0; - stats->dh_conn_sweeps.v = 0; - stats->dh_conn_tod.v = 0; + stats->dh_sweep_ref.v = 0; + stats->dh_sweep_close.v = 0; + stats->dh_sweep_remove.v = 0; + stats->dh_sweep_tod.v = 0; + stats->dh_sweeps.v = 0; stats->dh_session_handles.v = 0; stats->dh_session_sweeps.v = 0; stats->log_slot_closes.v = 0; diff --git a/src/third_party/wiredtiger/src/txn/txn_nsnap.c b/src/third_party/wiredtiger/src/txn/txn_nsnap.c index d0316ecef95..be736cc1c98 100644 --- a/src/third_party/wiredtiger/src/txn/txn_nsnap.c +++ b/src/third_party/wiredtiger/src/txn/txn_nsnap.c @@ -358,9 +358,7 @@ __wt_txn_named_snapshot_destroy(WT_SESSION_IMPL *session) txn_global = &S2C(session)->txn_global; txn_global->nsnap_oldest_id = WT_TXN_NONE; - while (!TAILQ_EMPTY(&txn_global->nsnaph)) { - nsnap = TAILQ_FIRST(&txn_global->nsnaph); - WT_ASSERT(session, nsnap != NULL); + while ((nsnap = TAILQ_FIRST(&txn_global->nsnaph)) != NULL) { TAILQ_REMOVE(&txn_global->nsnaph, nsnap, q); __nsnap_destroy(session, nsnap); } diff --git a/src/third_party/wiredtiger/tools/wtstats/stat_data.py b/src/third_party/wiredtiger/tools/wtstats/stat_data.py index a4fc2fcc831..d480ecb0547 100644 --- a/src/third_party/wiredtiger/tools/wtstats/stat_data.py +++ b/src/third_party/wiredtiger/tools/wtstats/stat_data.py @@ -13,6 +13,7 @@ no_scale_per_second_list = [ 'cache: tracked dirty bytes in the cache', 'cache: tracked dirty pages in the cache', 'connection: files currently open', + 'data-handle: connection data handles currently active', 'log: maximum log file size', 'log: number of pre-allocated log files to create', 'log: total log buffer size', @@ -72,6 +73,7 @@ no_clear_list = [ 'cache: tracked dirty bytes in the cache', 'cache: tracked dirty pages in the cache', 'connection: files currently open', + 'data-handle: connection data handles currently active', 'log: maximum log file size', 'log: number of pre-allocated log files to create', 'log: total log buffer size', |