summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/conn/conn_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_stat.c')
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_stat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_stat.c b/src/third_party/wiredtiger/src/conn/conn_stat.c
index 95028fa55e0..2697c24d554 100644
--- a/src/third_party/wiredtiger/src/conn/conn_stat.c
+++ b/src/third_party/wiredtiger/src/conn/conn_stat.c
@@ -494,17 +494,19 @@ __statlog_log_one(WT_SESSION_IMPL *session, WT_ITEM *path, WT_ITEM *tmp)
/*
* Lock the schema and walk the list of open handles, dumping any that match the list of object
- * sources.
+ * sources. Statistics logging starts before recovery is run. Only walk the handles after the
+ * connection completes recovery.
*/
- if (conn->stat_sources != NULL)
+ if (conn->stat_sources != NULL && F_ISSET(conn, WT_CONN_RECOVERY_COMPLETE))
WT_RET(__wt_conn_btree_apply(session, NULL, __statlog_apply, NULL, NULL));
/*
- * Walk the list of open LSM trees, dumping any that match the list of object sources.
+ * Walk the list of open LSM trees, dumping any that match the list of object sources. Only walk
+ * handles after the connection after completes recovery.
*
* XXX This code should be removed when LSM objects are converted to data handles.
*/
- if (conn->stat_sources != NULL)
+ if (conn->stat_sources != NULL && F_ISSET(conn, WT_CONN_RECOVERY_COMPLETE))
WT_RET(__statlog_lsm_apply(session));
WT_RET(__statlog_print_footer(session));