Fix bug in stat collection when target pages are reduced due to high HS cache pressure

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT10.0.1, 4.4.7, 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Storage - Ra 2021-05-03
    • 2

      We introduced a fix in WT-6924 to tackle increased cache usage due to HS content. One of the stats added as part of fix is being incorrectly calculated in __evict_walk_pages():

       if (!WT_IS_HS(btree->dhandle) && __wt_cache_hs_dirty(session)) {         
         /* If target pages are less than 10, keep it like that. */            
         target_pages = target_pages < 10 ? target_pages : target_pages / 10;             
         WT_STAT_CONN_INCR(session, cache_eviction_target_page_reduced);           
         WT_STAT_DATA_INCR(session, cache_eviction_target_page_reduced);    
      }

      The stat should only be updated when we actually reduce the number of target pages.

            Assignee:
            Monica Ng
            Reporter:
            Haseeb Bokhari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: