Compare commits
19 Commits
mongodb-3.
...
mongodb-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
827b48a342 | ||
|
|
3579adf6c8 | ||
|
|
3166629c1d | ||
|
|
b062bf8fd2 | ||
|
|
fed17d6f32 | ||
|
|
74510affec | ||
|
|
d2f2eae6d7 | ||
|
|
89049da5f3 | ||
|
|
0300f6d56c | ||
|
|
cd2d31add1 | ||
|
|
b22f088bf3 | ||
|
|
0384f6ddbc | ||
|
|
ef9d122dd1 | ||
|
|
04a1578300 | ||
|
|
42c3687558 | ||
|
|
1bcb9a0cc4 | ||
|
|
ba73da9cd7 | ||
|
|
78109ca3fe | ||
|
|
9b60343ed7 |
1
dist/s_string.ok
vendored
1
dist/s_string.ok
vendored
@@ -731,6 +731,7 @@ fsyncLock
|
||||
fsyncs
|
||||
ftruncate
|
||||
func
|
||||
fvisibility
|
||||
gcc
|
||||
gdb
|
||||
ge
|
||||
|
||||
1
dist/stat_data.py
vendored
1
dist/stat_data.py
vendored
@@ -150,6 +150,7 @@ connection_stats = [
|
||||
ConnStat('read_io', 'total read I/Os'),
|
||||
ConnStat('rwlock_read', 'pthread mutex shared lock read-lock calls'),
|
||||
ConnStat('rwlock_write', 'pthread mutex shared lock write-lock calls'),
|
||||
ConnStat('time_travel', 'detected system time went backwards'),
|
||||
ConnStat('write_io', 'total write I/Os'),
|
||||
|
||||
##########################################
|
||||
|
||||
@@ -471,6 +471,8 @@ __wt_row_ikey_alloc(WT_SESSION_IMPL *session,
|
||||
{
|
||||
WT_IKEY *ikey;
|
||||
|
||||
WT_ASSERT(session, key != NULL); /* quiet clang scan-build */
|
||||
|
||||
/*
|
||||
* Allocate memory for the WT_IKEY structure and the key, then copy
|
||||
* the key into place.
|
||||
|
||||
@@ -65,19 +65,20 @@ each of which is ordered by one or more columns.
|
||||
- @subpage_single wtperf
|
||||
- @subpage_single wtstats
|
||||
<p>
|
||||
- @subpage_single tune_memory_allocator
|
||||
- @subpage_single tune_page_size_and_comp
|
||||
- @subpage_single tune_cache
|
||||
- @subpage_single tune_build_options
|
||||
- @subpage_single tune_bulk_load
|
||||
- @subpage_single tune_cursor_persist
|
||||
- @subpage_single tune_read_only
|
||||
- @subpage_single tune_durability
|
||||
- @subpage_single tune_cache
|
||||
- @subpage_single tune_checksum
|
||||
- @subpage_single tune_close
|
||||
- @subpage_single tune_cursor_persist
|
||||
- @subpage_single tune_durability
|
||||
- @subpage_single tune_file_alloc
|
||||
- @subpage_single tune_memory_allocator
|
||||
- @subpage_single tune_mutex
|
||||
- @subpage_single tune_page_size_and_comp
|
||||
- @subpage_single tune_read_only
|
||||
- @subpage_single tune_system_buffer_cache
|
||||
- @subpage_single tune_transparent_huge_pages
|
||||
- @subpage_single tune_close
|
||||
- @subpage_single tune_mutex
|
||||
- @subpage_single tune_zone_reclaim
|
||||
|
||||
*/
|
||||
|
||||
@@ -237,6 +237,7 @@ fput
|
||||
freelist
|
||||
fsync
|
||||
ftruncate
|
||||
fvisibility
|
||||
gcc
|
||||
gdbm
|
||||
ge
|
||||
|
||||
9
src/docs/tune-build-options.dox
Normal file
9
src/docs/tune-build-options.dox
Normal file
@@ -0,0 +1,9 @@
|
||||
/*! @page tune_build_options gcc/clang build options
|
||||
|
||||
WiredTiger can be built using the gcc/clang \c -fvisibility=hidden flag,
|
||||
which may significantly reduce the size and load time of the WiredTiger
|
||||
library when built as a dynamic shared object, and allow the optimizer
|
||||
to produce better code (for example, by eliminating most lookups in the
|
||||
procedure linkage table).
|
||||
|
||||
*/
|
||||
@@ -941,6 +941,13 @@ __evict_tune_workers(WT_SESSION_IMPL *session)
|
||||
conn = S2C(session);
|
||||
cache = conn->cache;
|
||||
|
||||
/*
|
||||
* If we have a fixed number of eviction threads, there is no value in
|
||||
* calculating if we should do any tuning.
|
||||
*/
|
||||
if (conn->evict_threads_max == conn->evict_threads_min)
|
||||
return (0);
|
||||
|
||||
WT_ASSERT(session, conn->evict_threads.threads[0]->session == session);
|
||||
pgs_evicted_cur = pgs_evicted_persec_cur = 0;
|
||||
|
||||
|
||||
@@ -570,6 +570,7 @@ extern int __wt_schema_destroy_index(WT_SESSION_IMPL *session, WT_INDEX **idxp)
|
||||
extern int __wt_schema_destroy_table(WT_SESSION_IMPL *session, WT_TABLE **tablep) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
extern int __wt_schema_remove_table(WT_SESSION_IMPL *session, WT_TABLE *table) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
extern int __wt_schema_close_tables(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
extern int __wt_schema_sweep_tables(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
extern int __wt_schema_colgroup_name(WT_SESSION_IMPL *session, WT_TABLE *table, const char *cgname, size_t len, WT_ITEM *buf) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
extern int __wt_schema_open_colgroups(WT_SESSION_IMPL *session, WT_TABLE *table) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
extern int __wt_schema_open_index(WT_SESSION_IMPL *session, WT_TABLE *table, const char *idxname, size_t len, WT_INDEX **indexp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define WT_PTRDIFFT_FMT "td" /* ptrdiff_t format string */
|
||||
#define WT_SIZET_FMT "zu" /* size_t format string */
|
||||
|
||||
/* Add GCC-specific attributes to types and function declarations. */
|
||||
/* GCC-specific attributes. */
|
||||
#define WT_PACKED_STRUCT_BEGIN(name) \
|
||||
struct __attribute__ ((__packed__)) name {
|
||||
#define WT_PACKED_STRUCT_END \
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define WT_PTRDIFFT_FMT "td" /* ptrdiff_t format string */
|
||||
#define WT_SIZET_FMT "zu" /* size_t format string */
|
||||
|
||||
/* Lint-specific attributes. */
|
||||
#define WT_PACKED_STRUCT_BEGIN(name) \
|
||||
struct name {
|
||||
#define WT_PACKED_STRUCT_END \
|
||||
|
||||
@@ -54,6 +54,31 @@ __wt_seconds(WT_SESSION_IMPL *session, time_t *timep)
|
||||
*timep = t.tv_sec;
|
||||
}
|
||||
|
||||
/*
|
||||
* __wt_time_check_monotonic --
|
||||
* Check and prevent time running backward. If we detect that it has, we
|
||||
* set the time structure to the previous values, making time stand still
|
||||
* until we see a time in the future of the highest value seen so far.
|
||||
*/
|
||||
static inline void
|
||||
__wt_time_check_monotonic(WT_SESSION_IMPL *session, struct timespec *tsp)
|
||||
{
|
||||
/*
|
||||
* Detect time going backward. If so, use the last
|
||||
* saved timestamp.
|
||||
*/
|
||||
if (session == NULL)
|
||||
return;
|
||||
|
||||
if (tsp->tv_sec < session->last_epoch.tv_sec ||
|
||||
(tsp->tv_sec == session->last_epoch.tv_sec &&
|
||||
tsp->tv_nsec < session->last_epoch.tv_nsec)) {
|
||||
WT_STAT_CONN_INCR(session, time_travel);
|
||||
*tsp = session->last_epoch;
|
||||
} else
|
||||
session->last_epoch = *tsp;
|
||||
}
|
||||
|
||||
/*
|
||||
* __wt_verbose --
|
||||
* Verbose message.
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
#define WT_PTRDIFFT_FMT "Id" /* ptrdiff_t format string */
|
||||
#define WT_SIZET_FMT "Iu" /* size_t format string */
|
||||
|
||||
/*
|
||||
* Add MSVC-specific attributes and pragmas to types and function declarations.
|
||||
*/
|
||||
/* MSVC-specific attributes. */
|
||||
#define WT_PACKED_STRUCT_BEGIN(name) \
|
||||
__pragma(pack(push,1)) \
|
||||
struct name {
|
||||
|
||||
@@ -66,6 +66,7 @@ struct __wt_session_impl {
|
||||
/* Session handle reference list */
|
||||
TAILQ_HEAD(__dhandles, __wt_data_handle_cache) dhandles;
|
||||
time_t last_sweep; /* Last sweep for dead handles */
|
||||
struct timespec last_epoch; /* Last epoch time returned */
|
||||
|
||||
/* Cursors closed with the session */
|
||||
TAILQ_HEAD(__cursors, __wt_cursor) cursors;
|
||||
@@ -97,6 +98,12 @@ struct __wt_session_impl {
|
||||
*/
|
||||
TAILQ_HEAD(__tables, __wt_table) tables;
|
||||
|
||||
/*
|
||||
* Updated when the table cache is swept of all tables older than the
|
||||
* current schema generation.
|
||||
*/
|
||||
uint64_t table_sweep_gen;
|
||||
|
||||
/* Current rwlock for callback. */
|
||||
WT_RWLOCK *current_rwlock;
|
||||
uint8_t current_rwticket;
|
||||
|
||||
@@ -361,6 +361,7 @@ struct __wt_connection_stats {
|
||||
int64_t cache_eviction_clean;
|
||||
int64_t cond_auto_wait_reset;
|
||||
int64_t cond_auto_wait;
|
||||
int64_t time_travel;
|
||||
int64_t file_open;
|
||||
int64_t memory_allocation;
|
||||
int64_t memory_free;
|
||||
|
||||
@@ -93,6 +93,8 @@ struct __wt_txn_global {
|
||||
* the global transaction state.
|
||||
*/
|
||||
WT_RWLOCK scan_rwlock;
|
||||
/* Protects logging, checkpoints and transaction visibility. */
|
||||
WT_RWLOCK visibility_rwlock;
|
||||
|
||||
/*
|
||||
* Track information about the running checkpoint. The transaction
|
||||
|
||||
@@ -39,6 +39,16 @@ extern "C" {
|
||||
#define __F(func) (*(func))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We support configuring WiredTiger with the gcc/clang -fvisibility=hidden
|
||||
* flags, but that requires public APIs be specifically marked.
|
||||
*/
|
||||
#if defined(DOXYGEN) || defined(SWIG) || !defined(__GNUC__)
|
||||
#define WT_ATTRIBUTE_LIBRARY_VISIBLE
|
||||
#else
|
||||
#define WT_ATTRIBUTE_LIBRARY_VISIBLE __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifdef SWIG
|
||||
%{
|
||||
#include <wiredtiger.h>
|
||||
@@ -2553,7 +2563,7 @@ struct __wt_connection {
|
||||
*/
|
||||
int wiredtiger_open(const char *home,
|
||||
WT_EVENT_HANDLER *errhandler, const char *config,
|
||||
WT_CONNECTION **connectionp);
|
||||
WT_CONNECTION **connectionp) WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Return information about a WiredTiger error as a string (see
|
||||
@@ -2564,7 +2574,7 @@ int wiredtiger_open(const char *home,
|
||||
* @param error a return value from a WiredTiger, ISO C, or POSIX standard API
|
||||
* @returns a string representation of the error
|
||||
*/
|
||||
const char *wiredtiger_strerror(int error);
|
||||
const char *wiredtiger_strerror(int error) WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
#if !defined(SWIG)
|
||||
/*!
|
||||
@@ -2701,7 +2711,8 @@ struct __wt_event_handler {
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_struct_pack(WT_SESSION *session,
|
||||
void *buffer, size_t size, const char *format, ...);
|
||||
void *buffer, size_t size, const char *format, ...)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Calculate the size required to pack a structure.
|
||||
@@ -2719,7 +2730,7 @@ int wiredtiger_struct_pack(WT_SESSION *session,
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_struct_size(WT_SESSION *session,
|
||||
size_t *sizep, const char *format, ...);
|
||||
size_t *sizep, const char *format, ...) WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Unpack a structure from a buffer.
|
||||
@@ -2736,7 +2747,8 @@ int wiredtiger_struct_size(WT_SESSION *session,
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_struct_unpack(WT_SESSION *session,
|
||||
const void *buffer, size_t size, const char *format, ...);
|
||||
const void *buffer, size_t size, const char *format, ...)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
#if !defined(SWIG)
|
||||
|
||||
@@ -2763,7 +2775,8 @@ typedef struct __wt_pack_stream WT_PACK_STREAM;
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_pack_start(WT_SESSION *session,
|
||||
const char *format, void *buffer, size_t size, WT_PACK_STREAM **psp);
|
||||
const char *format, void *buffer, size_t size, WT_PACK_STREAM **psp)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Start an unpacking operation from a buffer with the given format string.
|
||||
@@ -2779,7 +2792,8 @@ int wiredtiger_pack_start(WT_SESSION *session,
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_unpack_start(WT_SESSION *session,
|
||||
const char *format, const void *buffer, size_t size, WT_PACK_STREAM **psp);
|
||||
const char *format, const void *buffer, size_t size, WT_PACK_STREAM **psp)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Close a packing stream.
|
||||
@@ -2788,7 +2802,8 @@ int wiredtiger_unpack_start(WT_SESSION *session,
|
||||
* @param[out] usedp the number of bytes in the buffer used by the stream
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_pack_close(WT_PACK_STREAM *ps, size_t *usedp);
|
||||
int wiredtiger_pack_close(WT_PACK_STREAM *ps, size_t *usedp)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Pack an item into a packing stream.
|
||||
@@ -2797,7 +2812,8 @@ int wiredtiger_pack_close(WT_PACK_STREAM *ps, size_t *usedp);
|
||||
* @param item an item to pack
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_pack_item(WT_PACK_STREAM *ps, WT_ITEM *item);
|
||||
int wiredtiger_pack_item(WT_PACK_STREAM *ps, WT_ITEM *item)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Pack a signed integer into a packing stream.
|
||||
@@ -2806,7 +2822,8 @@ int wiredtiger_pack_item(WT_PACK_STREAM *ps, WT_ITEM *item);
|
||||
* @param i a signed integer to pack
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_pack_int(WT_PACK_STREAM *ps, int64_t i);
|
||||
int wiredtiger_pack_int(WT_PACK_STREAM *ps, int64_t i)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Pack a string into a packing stream.
|
||||
@@ -2815,7 +2832,8 @@ int wiredtiger_pack_int(WT_PACK_STREAM *ps, int64_t i);
|
||||
* @param s a string to pack
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_pack_str(WT_PACK_STREAM *ps, const char *s);
|
||||
int wiredtiger_pack_str(WT_PACK_STREAM *ps, const char *s)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Pack an unsigned integer into a packing stream.
|
||||
@@ -2824,7 +2842,8 @@ int wiredtiger_pack_str(WT_PACK_STREAM *ps, const char *s);
|
||||
* @param u an unsigned integer to pack
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_pack_uint(WT_PACK_STREAM *ps, uint64_t u);
|
||||
int wiredtiger_pack_uint(WT_PACK_STREAM *ps, uint64_t u)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Unpack an item from a packing stream.
|
||||
@@ -2833,7 +2852,8 @@ int wiredtiger_pack_uint(WT_PACK_STREAM *ps, uint64_t u);
|
||||
* @param item an item to unpack
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_unpack_item(WT_PACK_STREAM *ps, WT_ITEM *item);
|
||||
int wiredtiger_unpack_item(WT_PACK_STREAM *ps, WT_ITEM *item)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Unpack a signed integer from a packing stream.
|
||||
@@ -2842,7 +2862,8 @@ int wiredtiger_unpack_item(WT_PACK_STREAM *ps, WT_ITEM *item);
|
||||
* @param[out] ip the unpacked signed integer
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_unpack_int(WT_PACK_STREAM *ps, int64_t *ip);
|
||||
int wiredtiger_unpack_int(WT_PACK_STREAM *ps, int64_t *ip)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Unpack a string from a packing stream.
|
||||
@@ -2851,7 +2872,8 @@ int wiredtiger_unpack_int(WT_PACK_STREAM *ps, int64_t *ip);
|
||||
* @param[out] sp the unpacked string
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_unpack_str(WT_PACK_STREAM *ps, const char **sp);
|
||||
int wiredtiger_unpack_str(WT_PACK_STREAM *ps, const char **sp)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* Unpack an unsigned integer from a packing stream.
|
||||
@@ -2860,7 +2882,8 @@ int wiredtiger_unpack_str(WT_PACK_STREAM *ps, const char **sp);
|
||||
* @param[out] up the unpacked unsigned integer
|
||||
* @errors
|
||||
*/
|
||||
int wiredtiger_unpack_uint(WT_PACK_STREAM *ps, uint64_t *up);
|
||||
int wiredtiger_unpack_uint(WT_PACK_STREAM *ps, uint64_t *up)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
/*! @} */
|
||||
|
||||
/*!
|
||||
@@ -2938,7 +2961,8 @@ struct __wt_config_item {
|
||||
* @snippet ex_all.c Validate a configuration string
|
||||
*/
|
||||
int wiredtiger_config_validate(WT_SESSION *session,
|
||||
WT_EVENT_HANDLER *errhandler, const char *name, const char *config);
|
||||
WT_EVENT_HANDLER *errhandler, const char *name, const char *config)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
@@ -2958,7 +2982,8 @@ int wiredtiger_config_validate(WT_SESSION *session,
|
||||
* @snippet ex_config_parse.c Create a configuration parser
|
||||
*/
|
||||
int wiredtiger_config_parser_open(WT_SESSION *session,
|
||||
const char *config, size_t len, WT_CONFIG_PARSER **config_parserp);
|
||||
const char *config, size_t len, WT_CONFIG_PARSER **config_parserp)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*!
|
||||
* A handle that can be used to search and traverse configuration strings
|
||||
@@ -3047,7 +3072,8 @@ struct __wt_config_parser {
|
||||
* @param patchp a location where the patch version number is returned
|
||||
* @returns a string representation of the version
|
||||
*/
|
||||
const char *wiredtiger_version(int *majorp, int *minorp, int *patchp);
|
||||
const char *wiredtiger_version(int *majorp, int *minorp, int *patchp)
|
||||
WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
/*******************************************
|
||||
* Error returns
|
||||
@@ -4546,304 +4572,306 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
|
||||
#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1102
|
||||
/*! connection: auto adjusting condition wait calls */
|
||||
#define WT_STAT_CONN_COND_AUTO_WAIT 1103
|
||||
/*! connection: detected system time went backwards */
|
||||
#define WT_STAT_CONN_TIME_TRAVEL 1104
|
||||
/*! connection: files currently open */
|
||||
#define WT_STAT_CONN_FILE_OPEN 1104
|
||||
#define WT_STAT_CONN_FILE_OPEN 1105
|
||||
/*! connection: memory allocations */
|
||||
#define WT_STAT_CONN_MEMORY_ALLOCATION 1105
|
||||
#define WT_STAT_CONN_MEMORY_ALLOCATION 1106
|
||||
/*! connection: memory frees */
|
||||
#define WT_STAT_CONN_MEMORY_FREE 1106
|
||||
#define WT_STAT_CONN_MEMORY_FREE 1107
|
||||
/*! connection: memory re-allocations */
|
||||
#define WT_STAT_CONN_MEMORY_GROW 1107
|
||||
#define WT_STAT_CONN_MEMORY_GROW 1108
|
||||
/*! connection: pthread mutex condition wait calls */
|
||||
#define WT_STAT_CONN_COND_WAIT 1108
|
||||
#define WT_STAT_CONN_COND_WAIT 1109
|
||||
/*! connection: pthread mutex shared lock read-lock calls */
|
||||
#define WT_STAT_CONN_RWLOCK_READ 1109
|
||||
#define WT_STAT_CONN_RWLOCK_READ 1110
|
||||
/*! connection: pthread mutex shared lock write-lock calls */
|
||||
#define WT_STAT_CONN_RWLOCK_WRITE 1110
|
||||
#define WT_STAT_CONN_RWLOCK_WRITE 1111
|
||||
/*! connection: total fsync I/Os */
|
||||
#define WT_STAT_CONN_FSYNC_IO 1111
|
||||
#define WT_STAT_CONN_FSYNC_IO 1112
|
||||
/*! connection: total read I/Os */
|
||||
#define WT_STAT_CONN_READ_IO 1112
|
||||
#define WT_STAT_CONN_READ_IO 1113
|
||||
/*! connection: total write I/Os */
|
||||
#define WT_STAT_CONN_WRITE_IO 1113
|
||||
#define WT_STAT_CONN_WRITE_IO 1114
|
||||
/*! cursor: cursor create calls */
|
||||
#define WT_STAT_CONN_CURSOR_CREATE 1114
|
||||
#define WT_STAT_CONN_CURSOR_CREATE 1115
|
||||
/*! cursor: cursor insert calls */
|
||||
#define WT_STAT_CONN_CURSOR_INSERT 1115
|
||||
#define WT_STAT_CONN_CURSOR_INSERT 1116
|
||||
/*! cursor: cursor next calls */
|
||||
#define WT_STAT_CONN_CURSOR_NEXT 1116
|
||||
#define WT_STAT_CONN_CURSOR_NEXT 1117
|
||||
/*! cursor: cursor prev calls */
|
||||
#define WT_STAT_CONN_CURSOR_PREV 1117
|
||||
#define WT_STAT_CONN_CURSOR_PREV 1118
|
||||
/*! cursor: cursor remove calls */
|
||||
#define WT_STAT_CONN_CURSOR_REMOVE 1118
|
||||
#define WT_STAT_CONN_CURSOR_REMOVE 1119
|
||||
/*! cursor: cursor reset calls */
|
||||
#define WT_STAT_CONN_CURSOR_RESET 1119
|
||||
#define WT_STAT_CONN_CURSOR_RESET 1120
|
||||
/*! cursor: cursor restarted searches */
|
||||
#define WT_STAT_CONN_CURSOR_RESTART 1120
|
||||
#define WT_STAT_CONN_CURSOR_RESTART 1121
|
||||
/*! cursor: cursor search calls */
|
||||
#define WT_STAT_CONN_CURSOR_SEARCH 1121
|
||||
#define WT_STAT_CONN_CURSOR_SEARCH 1122
|
||||
/*! cursor: cursor search near calls */
|
||||
#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1122
|
||||
#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1123
|
||||
/*! cursor: cursor update calls */
|
||||
#define WT_STAT_CONN_CURSOR_UPDATE 1123
|
||||
#define WT_STAT_CONN_CURSOR_UPDATE 1124
|
||||
/*! cursor: truncate calls */
|
||||
#define WT_STAT_CONN_CURSOR_TRUNCATE 1124
|
||||
#define WT_STAT_CONN_CURSOR_TRUNCATE 1125
|
||||
/*! data-handle: connection data handles currently active */
|
||||
#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1125
|
||||
#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1126
|
||||
/*! data-handle: connection sweep candidate became referenced */
|
||||
#define WT_STAT_CONN_DH_SWEEP_REF 1126
|
||||
#define WT_STAT_CONN_DH_SWEEP_REF 1127
|
||||
/*! data-handle: connection sweep dhandles closed */
|
||||
#define WT_STAT_CONN_DH_SWEEP_CLOSE 1127
|
||||
#define WT_STAT_CONN_DH_SWEEP_CLOSE 1128
|
||||
/*! data-handle: connection sweep dhandles removed from hash list */
|
||||
#define WT_STAT_CONN_DH_SWEEP_REMOVE 1128
|
||||
#define WT_STAT_CONN_DH_SWEEP_REMOVE 1129
|
||||
/*! data-handle: connection sweep time-of-death sets */
|
||||
#define WT_STAT_CONN_DH_SWEEP_TOD 1129
|
||||
#define WT_STAT_CONN_DH_SWEEP_TOD 1130
|
||||
/*! data-handle: connection sweeps */
|
||||
#define WT_STAT_CONN_DH_SWEEPS 1130
|
||||
#define WT_STAT_CONN_DH_SWEEPS 1131
|
||||
/*! data-handle: session dhandles swept */
|
||||
#define WT_STAT_CONN_DH_SESSION_HANDLES 1131
|
||||
#define WT_STAT_CONN_DH_SESSION_HANDLES 1132
|
||||
/*! data-handle: session sweep attempts */
|
||||
#define WT_STAT_CONN_DH_SESSION_SWEEPS 1132
|
||||
#define WT_STAT_CONN_DH_SESSION_SWEEPS 1133
|
||||
/*! lock: checkpoint lock acquisitions */
|
||||
#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1133
|
||||
#define WT_STAT_CONN_LOCK_CHECKPOINT_COUNT 1134
|
||||
/*! lock: checkpoint lock application thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1134
|
||||
#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_APPLICATION 1135
|
||||
/*! lock: checkpoint lock internal thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1135
|
||||
#define WT_STAT_CONN_LOCK_CHECKPOINT_WAIT_INTERNAL 1136
|
||||
/*! lock: handle-list lock eviction thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_HANDLE_LIST_WAIT_EVICTION 1136
|
||||
#define WT_STAT_CONN_LOCK_HANDLE_LIST_WAIT_EVICTION 1137
|
||||
/*! lock: metadata lock acquisitions */
|
||||
#define WT_STAT_CONN_LOCK_METADATA_COUNT 1137
|
||||
#define WT_STAT_CONN_LOCK_METADATA_COUNT 1138
|
||||
/*! lock: metadata lock application thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1138
|
||||
#define WT_STAT_CONN_LOCK_METADATA_WAIT_APPLICATION 1139
|
||||
/*! lock: metadata lock internal thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1139
|
||||
#define WT_STAT_CONN_LOCK_METADATA_WAIT_INTERNAL 1140
|
||||
/*! lock: schema lock acquisitions */
|
||||
#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1140
|
||||
#define WT_STAT_CONN_LOCK_SCHEMA_COUNT 1141
|
||||
/*! lock: schema lock application thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1141
|
||||
#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_APPLICATION 1142
|
||||
/*! lock: schema lock internal thread wait time (usecs) */
|
||||
#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1142
|
||||
#define WT_STAT_CONN_LOCK_SCHEMA_WAIT_INTERNAL 1143
|
||||
/*! lock: table lock acquisitions */
|
||||
#define WT_STAT_CONN_LOCK_TABLE_COUNT 1143
|
||||
#define WT_STAT_CONN_LOCK_TABLE_COUNT 1144
|
||||
/*!
|
||||
* lock: table lock application thread time waiting for the table lock
|
||||
* (usecs)
|
||||
*/
|
||||
#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1144
|
||||
#define WT_STAT_CONN_LOCK_TABLE_WAIT_APPLICATION 1145
|
||||
/*!
|
||||
* lock: table lock internal thread time waiting for the table lock
|
||||
* (usecs)
|
||||
*/
|
||||
#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1145
|
||||
#define WT_STAT_CONN_LOCK_TABLE_WAIT_INTERNAL 1146
|
||||
/*! log: busy returns attempting to switch slots */
|
||||
#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1146
|
||||
#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1147
|
||||
/*! log: consolidated slot closures */
|
||||
#define WT_STAT_CONN_LOG_SLOT_CLOSES 1147
|
||||
#define WT_STAT_CONN_LOG_SLOT_CLOSES 1148
|
||||
/*! log: consolidated slot join active slot closed */
|
||||
#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1148
|
||||
#define WT_STAT_CONN_LOG_SLOT_ACTIVE_CLOSED 1149
|
||||
/*! log: consolidated slot join races */
|
||||
#define WT_STAT_CONN_LOG_SLOT_RACES 1149
|
||||
#define WT_STAT_CONN_LOG_SLOT_RACES 1150
|
||||
/*! log: consolidated slot join transitions */
|
||||
#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1150
|
||||
#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1151
|
||||
/*! log: consolidated slot joins */
|
||||
#define WT_STAT_CONN_LOG_SLOT_JOINS 1151
|
||||
#define WT_STAT_CONN_LOG_SLOT_JOINS 1152
|
||||
/*! log: consolidated slot transitions unable to find free slot */
|
||||
#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1152
|
||||
#define WT_STAT_CONN_LOG_SLOT_NO_FREE_SLOTS 1153
|
||||
/*! log: consolidated slot unbuffered writes */
|
||||
#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1153
|
||||
#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1154
|
||||
/*! log: log bytes of payload data */
|
||||
#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1154
|
||||
#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1155
|
||||
/*! log: log bytes written */
|
||||
#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1155
|
||||
#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1156
|
||||
/*! log: log files manually zero-filled */
|
||||
#define WT_STAT_CONN_LOG_ZERO_FILLS 1156
|
||||
#define WT_STAT_CONN_LOG_ZERO_FILLS 1157
|
||||
/*! log: log flush operations */
|
||||
#define WT_STAT_CONN_LOG_FLUSH 1157
|
||||
#define WT_STAT_CONN_LOG_FLUSH 1158
|
||||
/*! log: log force write operations */
|
||||
#define WT_STAT_CONN_LOG_FORCE_WRITE 1158
|
||||
#define WT_STAT_CONN_LOG_FORCE_WRITE 1159
|
||||
/*! log: log force write operations skipped */
|
||||
#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1159
|
||||
#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1160
|
||||
/*! log: log records compressed */
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1160
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1161
|
||||
/*! log: log records not compressed */
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1161
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1162
|
||||
/*! log: log records too small to compress */
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1162
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1163
|
||||
/*! log: log release advances write LSN */
|
||||
#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1163
|
||||
#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1164
|
||||
/*! log: log scan operations */
|
||||
#define WT_STAT_CONN_LOG_SCANS 1164
|
||||
#define WT_STAT_CONN_LOG_SCANS 1165
|
||||
/*! log: log scan records requiring two reads */
|
||||
#define WT_STAT_CONN_LOG_SCAN_REREADS 1165
|
||||
#define WT_STAT_CONN_LOG_SCAN_REREADS 1166
|
||||
/*! log: log server thread advances write LSN */
|
||||
#define WT_STAT_CONN_LOG_WRITE_LSN 1166
|
||||
#define WT_STAT_CONN_LOG_WRITE_LSN 1167
|
||||
/*! log: log server thread write LSN walk skipped */
|
||||
#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1167
|
||||
#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1168
|
||||
/*! log: log sync operations */
|
||||
#define WT_STAT_CONN_LOG_SYNC 1168
|
||||
#define WT_STAT_CONN_LOG_SYNC 1169
|
||||
/*! log: log sync time duration (usecs) */
|
||||
#define WT_STAT_CONN_LOG_SYNC_DURATION 1169
|
||||
#define WT_STAT_CONN_LOG_SYNC_DURATION 1170
|
||||
/*! log: log sync_dir operations */
|
||||
#define WT_STAT_CONN_LOG_SYNC_DIR 1170
|
||||
#define WT_STAT_CONN_LOG_SYNC_DIR 1171
|
||||
/*! log: log sync_dir time duration (usecs) */
|
||||
#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1171
|
||||
#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1172
|
||||
/*! log: log write operations */
|
||||
#define WT_STAT_CONN_LOG_WRITES 1172
|
||||
#define WT_STAT_CONN_LOG_WRITES 1173
|
||||
/*! log: logging bytes consolidated */
|
||||
#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1173
|
||||
#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1174
|
||||
/*! log: maximum log file size */
|
||||
#define WT_STAT_CONN_LOG_MAX_FILESIZE 1174
|
||||
#define WT_STAT_CONN_LOG_MAX_FILESIZE 1175
|
||||
/*! log: number of pre-allocated log files to create */
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_MAX 1175
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_MAX 1176
|
||||
/*! log: pre-allocated log files not ready and missed */
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1176
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1177
|
||||
/*! log: pre-allocated log files prepared */
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_FILES 1177
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_FILES 1178
|
||||
/*! log: pre-allocated log files used */
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_USED 1178
|
||||
#define WT_STAT_CONN_LOG_PREALLOC_USED 1179
|
||||
/*! log: records processed by log scan */
|
||||
#define WT_STAT_CONN_LOG_SCAN_RECORDS 1179
|
||||
#define WT_STAT_CONN_LOG_SCAN_RECORDS 1180
|
||||
/*! log: total in-memory size of compressed records */
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_MEM 1180
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_MEM 1181
|
||||
/*! log: total log buffer size */
|
||||
#define WT_STAT_CONN_LOG_BUFFER_SIZE 1181
|
||||
#define WT_STAT_CONN_LOG_BUFFER_SIZE 1182
|
||||
/*! log: total size of compressed records */
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_LEN 1182
|
||||
#define WT_STAT_CONN_LOG_COMPRESS_LEN 1183
|
||||
/*! log: written slots coalesced */
|
||||
#define WT_STAT_CONN_LOG_SLOT_COALESCED 1183
|
||||
#define WT_STAT_CONN_LOG_SLOT_COALESCED 1184
|
||||
/*! log: yields waiting for previous log file close */
|
||||
#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1184
|
||||
#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1185
|
||||
/*! reconciliation: fast-path pages deleted */
|
||||
#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1185
|
||||
#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1186
|
||||
/*! reconciliation: page reconciliation calls */
|
||||
#define WT_STAT_CONN_REC_PAGES 1186
|
||||
#define WT_STAT_CONN_REC_PAGES 1187
|
||||
/*! reconciliation: page reconciliation calls for eviction */
|
||||
#define WT_STAT_CONN_REC_PAGES_EVICTION 1187
|
||||
#define WT_STAT_CONN_REC_PAGES_EVICTION 1188
|
||||
/*! reconciliation: pages deleted */
|
||||
#define WT_STAT_CONN_REC_PAGE_DELETE 1188
|
||||
#define WT_STAT_CONN_REC_PAGE_DELETE 1189
|
||||
/*! reconciliation: split bytes currently awaiting free */
|
||||
#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1189
|
||||
#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1190
|
||||
/*! reconciliation: split objects currently awaiting free */
|
||||
#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1190
|
||||
#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1191
|
||||
/*! session: open cursor count */
|
||||
#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1191
|
||||
#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1192
|
||||
/*! session: open session count */
|
||||
#define WT_STAT_CONN_SESSION_OPEN 1192
|
||||
#define WT_STAT_CONN_SESSION_OPEN 1193
|
||||
/*! session: table alter failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1193
|
||||
#define WT_STAT_CONN_SESSION_TABLE_ALTER_FAIL 1194
|
||||
/*! session: table alter successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1194
|
||||
#define WT_STAT_CONN_SESSION_TABLE_ALTER_SUCCESS 1195
|
||||
/*! session: table alter unchanged and skipped */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1195
|
||||
#define WT_STAT_CONN_SESSION_TABLE_ALTER_SKIP 1196
|
||||
/*! session: table compact failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1196
|
||||
#define WT_STAT_CONN_SESSION_TABLE_COMPACT_FAIL 1197
|
||||
/*! session: table compact successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1197
|
||||
#define WT_STAT_CONN_SESSION_TABLE_COMPACT_SUCCESS 1198
|
||||
/*! session: table create failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1198
|
||||
#define WT_STAT_CONN_SESSION_TABLE_CREATE_FAIL 1199
|
||||
/*! session: table create successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1199
|
||||
#define WT_STAT_CONN_SESSION_TABLE_CREATE_SUCCESS 1200
|
||||
/*! session: table drop failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1200
|
||||
#define WT_STAT_CONN_SESSION_TABLE_DROP_FAIL 1201
|
||||
/*! session: table drop successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1201
|
||||
#define WT_STAT_CONN_SESSION_TABLE_DROP_SUCCESS 1202
|
||||
/*! session: table rebalance failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1202
|
||||
#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_FAIL 1203
|
||||
/*! session: table rebalance successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1203
|
||||
#define WT_STAT_CONN_SESSION_TABLE_REBALANCE_SUCCESS 1204
|
||||
/*! session: table rename failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1204
|
||||
#define WT_STAT_CONN_SESSION_TABLE_RENAME_FAIL 1205
|
||||
/*! session: table rename successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1205
|
||||
#define WT_STAT_CONN_SESSION_TABLE_RENAME_SUCCESS 1206
|
||||
/*! session: table salvage failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1206
|
||||
#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_FAIL 1207
|
||||
/*! session: table salvage successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1207
|
||||
#define WT_STAT_CONN_SESSION_TABLE_SALVAGE_SUCCESS 1208
|
||||
/*! session: table truncate failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1208
|
||||
#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_FAIL 1209
|
||||
/*! session: table truncate successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1209
|
||||
#define WT_STAT_CONN_SESSION_TABLE_TRUNCATE_SUCCESS 1210
|
||||
/*! session: table verify failed calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1210
|
||||
#define WT_STAT_CONN_SESSION_TABLE_VERIFY_FAIL 1211
|
||||
/*! session: table verify successful calls */
|
||||
#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1211
|
||||
#define WT_STAT_CONN_SESSION_TABLE_VERIFY_SUCCESS 1212
|
||||
/*! thread-state: active filesystem fsync calls */
|
||||
#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1212
|
||||
#define WT_STAT_CONN_THREAD_FSYNC_ACTIVE 1213
|
||||
/*! thread-state: active filesystem read calls */
|
||||
#define WT_STAT_CONN_THREAD_READ_ACTIVE 1213
|
||||
#define WT_STAT_CONN_THREAD_READ_ACTIVE 1214
|
||||
/*! thread-state: active filesystem write calls */
|
||||
#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1214
|
||||
#define WT_STAT_CONN_THREAD_WRITE_ACTIVE 1215
|
||||
/*! thread-yield: application thread time evicting (usecs) */
|
||||
#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1215
|
||||
#define WT_STAT_CONN_APPLICATION_EVICT_TIME 1216
|
||||
/*! thread-yield: application thread time waiting for cache (usecs) */
|
||||
#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1216
|
||||
#define WT_STAT_CONN_APPLICATION_CACHE_TIME 1217
|
||||
/*! thread-yield: page acquire busy blocked */
|
||||
#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1217
|
||||
#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1218
|
||||
/*! thread-yield: page acquire eviction blocked */
|
||||
#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1218
|
||||
#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1219
|
||||
/*! thread-yield: page acquire locked blocked */
|
||||
#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1219
|
||||
#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1220
|
||||
/*! thread-yield: page acquire read blocked */
|
||||
#define WT_STAT_CONN_PAGE_READ_BLOCKED 1220
|
||||
#define WT_STAT_CONN_PAGE_READ_BLOCKED 1221
|
||||
/*! thread-yield: page acquire time sleeping (usecs) */
|
||||
#define WT_STAT_CONN_PAGE_SLEEP 1221
|
||||
#define WT_STAT_CONN_PAGE_SLEEP 1222
|
||||
/*! transaction: number of named snapshots created */
|
||||
#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1222
|
||||
#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1223
|
||||
/*! transaction: number of named snapshots dropped */
|
||||
#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1223
|
||||
#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1224
|
||||
/*! transaction: transaction begins */
|
||||
#define WT_STAT_CONN_TXN_BEGIN 1224
|
||||
#define WT_STAT_CONN_TXN_BEGIN 1225
|
||||
/*! transaction: transaction checkpoint currently running */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1225
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1226
|
||||
/*! transaction: transaction checkpoint generation */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1226
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1227
|
||||
/*! transaction: transaction checkpoint max time (msecs) */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1227
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1228
|
||||
/*! transaction: transaction checkpoint min time (msecs) */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1228
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1229
|
||||
/*! transaction: transaction checkpoint most recent time (msecs) */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1229
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1230
|
||||
/*! transaction: transaction checkpoint scrub dirty target */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1230
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TARGET 1231
|
||||
/*! transaction: transaction checkpoint scrub time (msecs) */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1231
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_SCRUB_TIME 1232
|
||||
/*! transaction: transaction checkpoint total time (msecs) */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1232
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1233
|
||||
/*! transaction: transaction checkpoints */
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT 1233
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT 1234
|
||||
/*!
|
||||
* transaction: transaction checkpoints skipped because database was
|
||||
* clean
|
||||
*/
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1234
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_SKIPPED 1235
|
||||
/*! transaction: transaction failures due to cache overflow */
|
||||
#define WT_STAT_CONN_TXN_FAIL_CACHE 1235
|
||||
#define WT_STAT_CONN_TXN_FAIL_CACHE 1236
|
||||
/*!
|
||||
* transaction: transaction fsync calls for checkpoint after allocating
|
||||
* the transaction ID
|
||||
*/
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1236
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1237
|
||||
/*!
|
||||
* transaction: transaction fsync duration for checkpoint after
|
||||
* allocating the transaction ID (usecs)
|
||||
*/
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1237
|
||||
#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1238
|
||||
/*! transaction: transaction range of IDs currently pinned */
|
||||
#define WT_STAT_CONN_TXN_PINNED_RANGE 1238
|
||||
#define WT_STAT_CONN_TXN_PINNED_RANGE 1239
|
||||
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
|
||||
#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1239
|
||||
#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1240
|
||||
/*!
|
||||
* transaction: transaction range of IDs currently pinned by named
|
||||
* snapshots
|
||||
*/
|
||||
#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1240
|
||||
#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1241
|
||||
/*! transaction: transaction sync calls */
|
||||
#define WT_STAT_CONN_TXN_SYNC 1241
|
||||
#define WT_STAT_CONN_TXN_SYNC 1242
|
||||
/*! transaction: transactions committed */
|
||||
#define WT_STAT_CONN_TXN_COMMIT 1242
|
||||
#define WT_STAT_CONN_TXN_COMMIT 1243
|
||||
/*! transaction: transactions rolled back */
|
||||
#define WT_STAT_CONN_TXN_ROLLBACK 1243
|
||||
#define WT_STAT_CONN_TXN_ROLLBACK 1244
|
||||
|
||||
/*!
|
||||
* @}
|
||||
|
||||
@@ -266,6 +266,8 @@ __wt_strndup(WT_SESSION_IMPL *session, const void *str, size_t len, void *retp)
|
||||
|
||||
WT_RET(__wt_malloc(session, len + 1, &p));
|
||||
|
||||
WT_ASSERT(session, p != NULL); /* quiet clang scan-build */
|
||||
|
||||
/*
|
||||
* Don't change this to strncpy, we rely on this function to duplicate
|
||||
* "strings" that contain nul bytes.
|
||||
|
||||
@@ -59,13 +59,17 @@
|
||||
|
||||
#include "wt_internal.h"
|
||||
|
||||
extern int __wt_opterr, __wt_optind, __wt_optopt, __wt_optreset;
|
||||
extern int __wt_opterr WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
extern int __wt_optind WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
extern int __wt_optopt WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
extern int __wt_optreset WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
|
||||
int __wt_opterr = 1, /* if error message should be printed */
|
||||
__wt_optind = 1, /* index into parent argv vector */
|
||||
__wt_optopt, /* character checked for validity */
|
||||
__wt_optreset; /* reset getopt */
|
||||
|
||||
extern char *__wt_optarg;
|
||||
extern char *__wt_optarg WT_ATTRIBUTE_LIBRARY_VISIBLE;
|
||||
char *__wt_optarg; /* argument associated with option */
|
||||
|
||||
#define BADCH (int)'?'
|
||||
|
||||
@@ -37,7 +37,13 @@ __wt_posix_directory_list(WT_FILE_SYSTEM *file_system,
|
||||
dirallocsz = 0;
|
||||
entries = NULL;
|
||||
|
||||
/*
|
||||
* If opendir fails, we should have a NULL pointer with an error value,
|
||||
* but various static analysis programs remain unconvinced, check both.
|
||||
*/
|
||||
WT_SYSCALL_RETRY(((dirp = opendir(directory)) == NULL ? -1 : 0), ret);
|
||||
if (dirp == NULL && ret == 0)
|
||||
ret = EINVAL;
|
||||
if (ret != 0)
|
||||
WT_RET_MSG(session, ret,
|
||||
"%s: directory-list: opendir", directory);
|
||||
|
||||
@@ -16,6 +16,7 @@ void
|
||||
__wt_epoch(WT_SESSION_IMPL *session, struct timespec *tsp)
|
||||
WT_GCC_FUNC_ATTRIBUTE((visibility("default")))
|
||||
{
|
||||
struct timespec tmp;
|
||||
WT_DECL_RET;
|
||||
|
||||
/*
|
||||
@@ -27,21 +28,34 @@ __wt_epoch(WT_SESSION_IMPL *session, struct timespec *tsp)
|
||||
tsp->tv_sec = 0;
|
||||
tsp->tv_nsec = 0;
|
||||
|
||||
/*
|
||||
* Read into a local variable so that we're comparing the correct
|
||||
* value when we check for monotonic increasing time. There are
|
||||
* many places we read into an unlocked global variable.
|
||||
*/
|
||||
#if defined(HAVE_CLOCK_GETTIME)
|
||||
WT_SYSCALL_RETRY(clock_gettime(CLOCK_REALTIME, tsp), ret);
|
||||
if (ret == 0)
|
||||
WT_SYSCALL_RETRY(clock_gettime(CLOCK_REALTIME, &tmp), ret);
|
||||
if (ret == 0) {
|
||||
__wt_time_check_monotonic(session, &tmp);
|
||||
tsp->tv_sec = tmp.tv_sec;
|
||||
tsp->tv_nsec = tmp.tv_nsec;
|
||||
return;
|
||||
}
|
||||
WT_PANIC_MSG(session, ret, "clock_gettime");
|
||||
#elif defined(HAVE_GETTIMEOFDAY)
|
||||
{
|
||||
struct timeval v;
|
||||
|
||||
WT_SYSCALL_RETRY(gettimeofday(&v, NULL), ret);
|
||||
if (ret == 0) {
|
||||
tsp->tv_sec = v.tv_sec;
|
||||
tsp->tv_nsec = v.tv_usec * WT_THOUSAND;
|
||||
tmp.tv_sec = v.tv_sec;
|
||||
tmp.tv_nsec = v.tv_usec * WT_THOUSAND;
|
||||
__wt_time_check_monotonic(session, &tmp);
|
||||
*tsp = tmp;
|
||||
return;
|
||||
}
|
||||
WT_PANIC_MSG(session, ret, "gettimeofday");
|
||||
}
|
||||
#else
|
||||
NO TIME-OF-DAY IMPLEMENTATION: see src/os_posix/os_time.c
|
||||
#endif
|
||||
|
||||
@@ -15,17 +15,18 @@
|
||||
void
|
||||
__wt_epoch(WT_SESSION_IMPL *session, struct timespec *tsp)
|
||||
{
|
||||
struct timespec tmp;
|
||||
FILETIME time;
|
||||
uint64_t ns100;
|
||||
|
||||
WT_UNUSED(session);
|
||||
|
||||
GetSystemTimeAsFileTime(&time);
|
||||
|
||||
ns100 = (((int64_t)time.dwHighDateTime << 32) + time.dwLowDateTime)
|
||||
- 116444736000000000LL;
|
||||
tsp->tv_sec = ns100 / 10000000;
|
||||
tsp->tv_nsec = (long)((ns100 % 10000000) * 100);
|
||||
tmp.tv_sec = ns100 / 10000000;
|
||||
tmp.tv_nsec = (long)((ns100 % 10000000) * 100);
|
||||
__wt_time_check_monotonic(session, &tmp);
|
||||
*tsp = tmp;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -249,3 +249,34 @@ __wt_schema_close_tables(WT_SESSION_IMPL *session)
|
||||
WT_TRET(__wt_schema_remove_table(session, table));
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __wt_schema_sweep_tables --
|
||||
* Close all idle, obsolete tables in a session.
|
||||
*/
|
||||
int
|
||||
__wt_schema_sweep_tables(WT_SESSION_IMPL *session)
|
||||
{
|
||||
WT_TABLE *table, *next;
|
||||
uint64_t schema_gen;
|
||||
bool old_table_busy;
|
||||
|
||||
WT_ORDERED_READ(schema_gen, S2C(session)->schema_gen);
|
||||
if (schema_gen == session->table_sweep_gen)
|
||||
return (0);
|
||||
|
||||
old_table_busy = false;
|
||||
TAILQ_FOREACH_SAFE(table, &session->tables, q, next)
|
||||
if (table->schema_gen != schema_gen) {
|
||||
if (table->refcnt == 0)
|
||||
WT_RET(__wt_schema_remove_table(
|
||||
session, table));
|
||||
else
|
||||
old_table_busy = true;
|
||||
}
|
||||
|
||||
if (!old_table_busy)
|
||||
session->table_sweep_gen = schema_gen;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -818,6 +818,8 @@ __session_reset(WT_SESSION *wt_session)
|
||||
|
||||
WT_TRET(__wt_session_reset_cursors(session, true));
|
||||
|
||||
WT_TRET(__wt_schema_sweep_tables(session));
|
||||
|
||||
/* Release common session resources. */
|
||||
WT_TRET(__wt_session_release_resources(session));
|
||||
|
||||
@@ -1105,7 +1107,6 @@ int
|
||||
__wt_session_range_truncate(WT_SESSION_IMPL *session,
|
||||
const char *uri, WT_CURSOR *start, WT_CURSOR *stop)
|
||||
{
|
||||
WT_CURSOR *cursor;
|
||||
WT_DECL_RET;
|
||||
int cmp;
|
||||
bool local_start;
|
||||
@@ -1134,12 +1135,13 @@ __wt_session_range_truncate(WT_SESSION_IMPL *session,
|
||||
}
|
||||
|
||||
/*
|
||||
* Cursor truncate is only supported for some objects, check for the
|
||||
* supporting methods we need, range_truncate and compare.
|
||||
* Cursor truncate is only supported for some objects, check for a
|
||||
* supporting compare method.
|
||||
*/
|
||||
cursor = start == NULL ? stop : start;
|
||||
if (cursor->compare == NULL)
|
||||
WT_ERR(__wt_bad_object_type(session, cursor->uri));
|
||||
if (start != NULL && start->compare == NULL)
|
||||
WT_ERR(__wt_bad_object_type(session, start->uri));
|
||||
if (stop != NULL && stop->compare == NULL)
|
||||
WT_ERR(__wt_bad_object_type(session, stop->uri));
|
||||
|
||||
/*
|
||||
* If both cursors set, check they're correctly ordered with respect to
|
||||
@@ -1150,6 +1152,9 @@ __wt_session_range_truncate(WT_SESSION_IMPL *session,
|
||||
* reference the same object and the keys are set.
|
||||
*/
|
||||
if (start != NULL && stop != NULL) {
|
||||
/* quiet clang scan-build */
|
||||
WT_ASSERT(session, start->compare != NULL);
|
||||
|
||||
WT_ERR(start->compare(start, stop, &cmp));
|
||||
if (cmp > 0)
|
||||
WT_ERR_MSG(session, EINVAL,
|
||||
|
||||
@@ -728,6 +728,7 @@ static const char * const __stats_connection_desc[] = {
|
||||
"cache: unmodified pages evicted",
|
||||
"connection: auto adjusting condition resets",
|
||||
"connection: auto adjusting condition wait calls",
|
||||
"connection: detected system time went backwards",
|
||||
"connection: files currently open",
|
||||
"connection: memory allocations",
|
||||
"connection: memory frees",
|
||||
@@ -1014,6 +1015,7 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
|
||||
stats->cache_eviction_clean = 0;
|
||||
stats->cond_auto_wait_reset = 0;
|
||||
stats->cond_auto_wait = 0;
|
||||
stats->time_travel = 0;
|
||||
/* not clearing file_open */
|
||||
stats->memory_allocation = 0;
|
||||
stats->memory_free = 0;
|
||||
@@ -1320,6 +1322,7 @@ __wt_stat_connection_aggregate(
|
||||
to->cache_eviction_clean += WT_STAT_READ(from, cache_eviction_clean);
|
||||
to->cond_auto_wait_reset += WT_STAT_READ(from, cond_auto_wait_reset);
|
||||
to->cond_auto_wait += WT_STAT_READ(from, cond_auto_wait);
|
||||
to->time_travel += WT_STAT_READ(from, time_travel);
|
||||
to->file_open += WT_STAT_READ(from, file_open);
|
||||
to->memory_allocation += WT_STAT_READ(from, memory_allocation);
|
||||
to->memory_free += WT_STAT_READ(from, memory_free);
|
||||
|
||||
@@ -503,13 +503,17 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
|
||||
WT_CONNECTION_IMPL *conn;
|
||||
WT_DECL_RET;
|
||||
WT_TXN *txn;
|
||||
WT_TXN_GLOBAL *txn_global;
|
||||
WT_TXN_OP *op;
|
||||
u_int i;
|
||||
bool did_update;
|
||||
bool did_update, locked;
|
||||
|
||||
txn = &session->txn;
|
||||
conn = S2C(session);
|
||||
txn_global = &conn->txn_global;
|
||||
did_update = txn->mod_count != 0;
|
||||
locked = false;
|
||||
|
||||
WT_ASSERT(session, !F_ISSET(txn, WT_TXN_ERROR) || !did_update);
|
||||
|
||||
if (!F_ISSET(txn, WT_TXN_RUNNING))
|
||||
@@ -580,6 +584,14 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
|
||||
* This is particularly important for checkpoints.
|
||||
*/
|
||||
__wt_txn_release_snapshot(session);
|
||||
/*
|
||||
* We hold the visibility lock for reading from the time
|
||||
* we write our log record until the time we release our
|
||||
* transaction so that the LSN any checkpoint gets will
|
||||
* always reflect visible data.
|
||||
*/
|
||||
__wt_readlock(session, &txn_global->visibility_rwlock);
|
||||
locked = true;
|
||||
ret = __wt_txn_log_commit(session, cfg);
|
||||
}
|
||||
|
||||
@@ -590,8 +602,12 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
|
||||
* Nothing can fail after this point.
|
||||
*/
|
||||
if (ret != 0) {
|
||||
if (locked)
|
||||
__wt_readunlock(session,
|
||||
&txn_global->visibility_rwlock);
|
||||
WT_TRET(__wt_txn_rollback(session, cfg));
|
||||
return (ret);
|
||||
|
||||
}
|
||||
|
||||
/* Free memory associated with updates. */
|
||||
@@ -600,6 +616,8 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[])
|
||||
txn->mod_count = 0;
|
||||
|
||||
__wt_txn_release(session);
|
||||
if (locked)
|
||||
__wt_readunlock(session, &txn_global->visibility_rwlock);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -770,6 +788,7 @@ __wt_txn_global_init(WT_SESSION_IMPL *session, const char *cfg[])
|
||||
&txn_global->id_lock, "transaction id lock"));
|
||||
WT_RET(__wt_rwlock_init(session, &txn_global->scan_rwlock));
|
||||
WT_RET(__wt_rwlock_init(session, &txn_global->nsnap_rwlock));
|
||||
WT_RET(__wt_rwlock_init(session, &txn_global->visibility_rwlock));
|
||||
txn_global->nsnap_oldest_id = WT_TXN_NONE;
|
||||
TAILQ_INIT(&txn_global->nsnaph);
|
||||
|
||||
@@ -801,6 +820,7 @@ __wt_txn_global_destroy(WT_SESSION_IMPL *session)
|
||||
__wt_spin_destroy(session, &txn_global->id_lock);
|
||||
__wt_rwlock_destroy(session, &txn_global->scan_rwlock);
|
||||
__wt_rwlock_destroy(session, &txn_global->nsnap_rwlock);
|
||||
__wt_rwlock_destroy(session, &txn_global->visibility_rwlock);
|
||||
__wt_free(session, txn_global->states);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,11 +294,13 @@ __wt_txn_checkpoint_log(
|
||||
WT_ITEM *ckpt_snapshot, empty;
|
||||
WT_LSN *ckpt_lsn;
|
||||
WT_TXN *txn;
|
||||
WT_TXN_GLOBAL *txn_global;
|
||||
uint8_t *end, *p;
|
||||
size_t recsize;
|
||||
uint32_t i, rectype = WT_LOGREC_CHECKPOINT;
|
||||
const char *fmt = WT_UNCHECKED_STRING(IIIIu);
|
||||
|
||||
txn_global = &S2C(session)->txn_global;
|
||||
txn = &session->txn;
|
||||
ckpt_lsn = &txn->ckpt_lsn;
|
||||
|
||||
@@ -319,6 +321,15 @@ __wt_txn_checkpoint_log(
|
||||
case WT_TXN_LOG_CKPT_PREPARE:
|
||||
txn->full_ckpt = true;
|
||||
WT_ERR(__wt_log_flush_lsn(session, ckpt_lsn, true));
|
||||
/*
|
||||
* We take and immediately release the visibility lock.
|
||||
* Acquiring the write lock guarantees that any transaction
|
||||
* that has written to the log has also made its transaction
|
||||
* visible at this time.
|
||||
*/
|
||||
__wt_writelock(session, &txn_global->visibility_rwlock);
|
||||
__wt_writeunlock(session, &txn_global->visibility_rwlock);
|
||||
|
||||
/*
|
||||
* We need to make sure that the log records in the checkpoint
|
||||
* LSN are on disk. In particular to make sure that the
|
||||
|
||||
Reference in New Issue
Block a user