Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-6478

Cursor cache statistics not getting incremented

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • WT10.0.0, 4.4.2, 4.7.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              keith.smith@mongodb.com Keith Smith
              keith.smith@mongodb.com Keith Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: