summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/support')
-rw-r--r--src/third_party/wiredtiger/src/support/err.c34
-rw-r--r--src/third_party/wiredtiger/src/support/filename.c2
-rw-r--r--src/third_party/wiredtiger/src/support/hazard.c4
-rw-r--r--src/third_party/wiredtiger/src/support/scratch.c2
-rw-r--r--src/third_party/wiredtiger/src/support/stat.c13
5 files changed, 30 insertions, 25 deletions
diff --git a/src/third_party/wiredtiger/src/support/err.c b/src/third_party/wiredtiger/src/support/err.c
index fc6569cb81e..e9b7a53a2ab 100644
--- a/src/third_party/wiredtiger/src/support/err.c
+++ b/src/third_party/wiredtiger/src/support/err.c
@@ -16,15 +16,12 @@ static int
__handle_error_default(WT_EVENT_HANDLER *handler,
WT_SESSION *wt_session, int error, const char *errmsg)
{
- WT_SESSION_IMPL *session;
-
WT_UNUSED(handler);
+ WT_UNUSED(wt_session);
WT_UNUSED(error);
- session = (WT_SESSION_IMPL *)wt_session;
-
- WT_RET(__wt_fprintf(session, stderr, "%s\n", errmsg));
- WT_RET(__wt_fflush(session, stderr));
+ WT_RET(__wt_fprintf(stderr, "%s\n", errmsg));
+ WT_RET(__wt_fflush(stderr));
return (0);
}
@@ -36,14 +33,11 @@ static int
__handle_message_default(WT_EVENT_HANDLER *handler,
WT_SESSION *wt_session, const char *message)
{
- WT_SESSION_IMPL *session;
-
WT_UNUSED(handler);
+ WT_UNUSED(wt_session);
- session = (WT_SESSION_IMPL *)wt_session;
-
- WT_RET(__wt_fprintf(session, stdout, "%s\n", message));
- WT_RET(__wt_fflush(session, stdout));
+ WT_RET(__wt_fprintf(stdout, "%s\n", message));
+ WT_RET(__wt_fflush(stdout));
return (0);
}
@@ -181,23 +175,23 @@ __wt_eventv(WT_SESSION_IMPL *session, int msg_event, int error,
* example, we can end up here without a session.)
*/
if (session == NULL) {
- WT_RET(__wt_fprintf(session, stderr,
+ WT_RET(__wt_fprintf(stderr,
"WiredTiger Error%s%s: ",
error == 0 ? "" : ": ",
error == 0 ? "" : __wt_strerror(session, error, NULL, 0)));
- WT_RET(__wt_vfprintf(session, stderr, fmt, ap));
- WT_RET(__wt_fprintf(session, stderr, "\n"));
- return (__wt_fflush(session, stderr));
+ WT_RET(__wt_vfprintf(stderr, fmt, ap));
+ WT_RET(__wt_fprintf(stderr, "\n"));
+ return (__wt_fflush(stderr));
}
p = s;
end = s + sizeof(s);
/*
- * We have several prefixes for the error message:
- * a timestamp and the process and thread ids, the database error
- * prefix, the data-source's name, and the session's name. Write them
- * as a comma-separate list, followed by a colon.
+ * We have several prefixes for the error message: a timestamp and the
+ * process and thread ids, the database error prefix, the data-source's
+ * name, and the session's name. Write them as a comma-separate list,
+ * followed by a colon.
*/
prefix_cnt = 0;
if (__wt_epoch(session, &ts) == 0) {
diff --git a/src/third_party/wiredtiger/src/support/filename.c b/src/third_party/wiredtiger/src/support/filename.c
index db466ed3bd4..2d284aeb0b0 100644
--- a/src/third_party/wiredtiger/src/support/filename.c
+++ b/src/third_party/wiredtiger/src/support/filename.c
@@ -104,7 +104,7 @@ __wt_sync_and_rename_fp(
*fpp = NULL;
/* Flush to disk and close the handle. */
- WT_RET(__wt_fclose(session, &fp, WT_FHANDLE_WRITE));
+ WT_RET(__wt_fclose(&fp, WT_FHANDLE_WRITE));
/* Rename the source file to the target. */
WT_RET(__wt_rename(session, from, to));
diff --git a/src/third_party/wiredtiger/src/support/hazard.c b/src/third_party/wiredtiger/src/support/hazard.c
index bc44f7967a5..37cb8bf6ce0 100644
--- a/src/third_party/wiredtiger/src/support/hazard.c
+++ b/src/third_party/wiredtiger/src/support/hazard.c
@@ -33,7 +33,7 @@ __wt_hazard_set(WT_SESSION_IMPL *session, WT_REF *ref, int *busyp
*busyp = 0;
/* If a file can never be evicted, hazard pointers aren't required. */
- if (F_ISSET(btree, WT_BTREE_NO_HAZARD))
+ if (F_ISSET(btree, WT_BTREE_IN_MEMORY))
return (0);
/*
@@ -142,7 +142,7 @@ __wt_hazard_clear(WT_SESSION_IMPL *session, WT_PAGE *page)
btree = S2BT(session);
/* If a file can never be evicted, hazard pointers aren't required. */
- if (F_ISSET(btree, WT_BTREE_NO_HAZARD))
+ if (F_ISSET(btree, WT_BTREE_IN_MEMORY))
return (0);
/*
diff --git a/src/third_party/wiredtiger/src/support/scratch.c b/src/third_party/wiredtiger/src/support/scratch.c
index 957101b8fae..ebea484a51f 100644
--- a/src/third_party/wiredtiger/src/support/scratch.c
+++ b/src/third_party/wiredtiger/src/support/scratch.c
@@ -269,6 +269,8 @@ __wt_scr_discard(WT_SESSION_IMPL *session)
__wt_free(session, *bufp);
}
+ session->scratch_alloc = 0;
+ session->scratch_cached = 0;
__wt_free(session, session->scratch);
#ifdef HAVE_DIAGNOSTIC
__wt_free(session, session->scratch_track);
diff --git a/src/third_party/wiredtiger/src/support/stat.c b/src/third_party/wiredtiger/src/support/stat.c
index 824914bf8bf..aa30126ca91 100644
--- a/src/third_party/wiredtiger/src/support/stat.c
+++ b/src/third_party/wiredtiger/src/support/stat.c
@@ -253,6 +253,16 @@ __wt_stat_aggregate_dsrc_stats(const void *child, const void *parent)
p->btree_column_internal.v += c->btree_column_internal.v;
p->btree_column_deleted.v += c->btree_column_deleted.v;
p->btree_column_variable.v += c->btree_column_variable.v;
+ if (c->btree_maxintlkey.v > p->btree_maxintlkey.v)
+ p->btree_maxintlkey.v = c->btree_maxintlkey.v;
+ if (c->btree_maxintlpage.v > p->btree_maxintlpage.v)
+ p->btree_maxintlpage.v = c->btree_maxintlpage.v;
+ if (c->btree_maxleafkey.v > p->btree_maxleafkey.v)
+ p->btree_maxleafkey.v = c->btree_maxleafkey.v;
+ if (c->btree_maxleafpage.v > p->btree_maxleafpage.v)
+ p->btree_maxleafpage.v = c->btree_maxleafpage.v;
+ if (c->btree_maxleafvalue.v > p->btree_maxleafvalue.v)
+ p->btree_maxleafvalue.v = c->btree_maxleafvalue.v;
if (c->btree_maximum_depth.v > p->btree_maximum_depth.v)
p->btree_maximum_depth.v = c->btree_maximum_depth.v;
p->btree_entries.v += c->btree_entries.v;
@@ -301,6 +311,7 @@ __wt_stat_aggregate_dsrc_stats(const void *child, const void *parent)
p->bloom_page_evict.v += c->bloom_page_evict.v;
p->bloom_page_read.v += c->bloom_page_read.v;
p->bloom_count.v += c->bloom_count.v;
+ p->lsm_chunk_count.v += c->lsm_chunk_count.v;
if (c->lsm_generation_max.v > p->lsm_generation_max.v)
p->lsm_generation_max.v = c->lsm_generation_max.v;
p->lsm_lookup_no_bloom.v += c->lsm_lookup_no_bloom.v;
@@ -550,7 +561,6 @@ __wt_stat_refresh_connection_stats(void *stats_arg)
stats = (WT_CONNECTION_STATS *)stats_arg;
stats->async_cur_queue.v = 0;
- stats->async_max_queue.v = 0;
stats->async_alloc_race.v = 0;
stats->async_flush.v = 0;
stats->async_alloc_view.v = 0;
@@ -582,7 +592,6 @@ __wt_stat_refresh_connection_stats(void *stats_arg)
stats->cache_eviction_hazard.v = 0;
stats->cache_inmem_split.v = 0;
stats->cache_eviction_internal.v = 0;
- stats->cache_eviction_maximum_page_size.v = 0;
stats->cache_eviction_dirty.v = 0;
stats->cache_eviction_deepen.v = 0;
stats->cache_eviction_force.v = 0;