-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Foundations
-
117.33
-
None
-
None
WiredTiger statistics keys are allocated from two fixed bases: connection stats start at WT_STAT_CONN_BASE (1000) and data-source (table) stats start at WT_STAT_DSRC_BASE (2000). The connection stat list now has more than 1000 entries, so the connection range overlaps with the data-source range. That has caused this test failure in GetStatisticsValueInvalidKey where WT_STAT_CONN_SESSION_OPEN was accepted as a valid table statistics cursor.
Stat cursors only range-check against their own type in cur_stat.c. A connection key passed to a table cursor therefore isn't rejected once it falls in the data-source range and returns an unrelated table stat.
if (WT_STAT_OTEL_SUBSET(cst))
WT_ERR(__curstat_otel_search(cst));
else if (cst->key < WT_STAT_KEY_MIN(cst) || cst->key > WT_STAT_KEY_MAX(cst))
WT_ERR(WT_NOTFOUND);
Callers that pass the wrong stat key get a wrong value instead of an error. We should change the stat generation so the two ranges cannot overlap, and add a WT test that fails if the two ranges overlap and a connection key passed to a table stat cursor is rejected.
- related to
-
SERVER-139305 WiredTigerUtilTest.GetStatisticsValueInvalidKey fails due to WT connection stat keys shift
-
- Closed
-