Skip to content

Commit 0e0fe84

Browse files
ruby-oujoEvergreen Agent
authored andcommitted
Import wiredtiger: f6b53220bf1ba63e95ff5fd12ab9dc56ec2b6e7a from branch mongodb-master
ref: 5b5f12635b..f6b53220bf for: 7.2.0-rc0 WT-7929 Investigate a solution to avoid FTDC stalls during checkpoint
1 parent ec131e8 commit 0e0fe84

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

src/third_party/wiredtiger/import.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"vendor": "wiredtiger",
33
"github": "wiredtiger/wiredtiger.git",
44
"branch": "mongodb-master",
5-
"commit": "5b5f12635bdc5ce6f1c68bc58fbae13ec6a042fd"
5+
"commit": "f6b53220bf1ba63e95ff5fd12ab9dc56ec2b6e7a"
66
}

src/third_party/wiredtiger/src/schema/schema_open.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,6 @@ __schema_open_index(
261261
const char *idxconf, *name, *tablename, *uri;
262262
bool match;
263263

264-
/* Check if we've already done the work. */
265-
if (idxname == NULL && table->idx_complete)
266-
return (0);
267-
268264
cursor = NULL;
269265
idx = NULL;
270266
match = false;
@@ -388,6 +384,10 @@ __wt_schema_open_index(
388384
{
389385
WT_DECL_RET;
390386

387+
/* Check if we've already done the work. */
388+
if (idxname == NULL && table->idx_complete)
389+
return (0);
390+
391391
WT_WITH_TABLE_WRITE_LOCK(session,
392392
WT_WITH_TXN_ISOLATION(session, WT_ISO_READ_UNCOMMITTED,
393393
ret = __schema_open_index(session, table, idxname, len, indexp)));

src/third_party/wiredtiger/src/schema/schema_stat.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,27 @@ __wt_curstat_table_init(
147147

148148
WT_ERR(__wt_scr_alloc(session, 0, &buf));
149149

150+
stats = &cst->u.dsrc_stats;
151+
152+
/*
153+
* If gathering statistics for a simple table, retrieve the underlying file's statistics rather
154+
* than going through the usual schema parsing flow. This avoids unnecessary overhead in the
155+
* statistics gathering process.
156+
*
157+
* There will always be at least one column group for a table.
158+
*/
159+
if (table->is_simple) {
160+
WT_ERR(__wt_buf_fmt(session, buf, "statistics:%s", table->cgroups[0]->name));
161+
WT_ERR(__wt_curstat_init(session, buf->data, NULL, cfg, cst));
162+
goto done;
163+
}
164+
150165
/*
151166
* Process the column groups.
152167
*
153168
* Set the cursor to reference the data source statistics; we don't initialize it, instead we
154169
* copy (rather than aggregate), the first column's statistics, which has the same effect.
155170
*/
156-
stats = &cst->u.dsrc_stats;
157171
for (i = 0; i < WT_COLGROUPS(table); i++) {
158172
WT_ERR(__wt_buf_fmt(session, buf, "statistics:%s", table->cgroups[i]->name));
159173
WT_ERR(__wt_curstat_open(session, buf->data, NULL, cfg, &stat_cursor));
@@ -177,6 +191,7 @@ __wt_curstat_table_init(
177191

178192
__wt_curstat_dsrc_final(cst);
179193

194+
done:
180195
err:
181196
WT_TRET(__wt_schema_release_table(session, &table));
182197

0 commit comments

Comments
 (0)