The cursor_cache statistic tracks the number of times we add cursors to the cursor cache. In the per-data-source statistics, however, this value is always zero.
The problem is in wt_cursor_cache_release():
WT_ERR(cursor->cache(cursor)); WT_STAT_CONN_INCR(session, cursor_cache); WT_STAT_DATA_INCR(session, cursor_cache);
The call to cursor->cache releases the dhandle, setting session->dhandle to NULL. As a result, WT_STAT_DATA_INCR doesn't have a dhandle to update.
A simple fix would be to move the stats before the call to cursor->cache. We'd wind up over counting in error cases, but that would be better than not counting anything.
- related to
-
WT-6743 Save and restore session's data handle during cursor reopen call
- Closed