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

Fix misrepresentation in cache eviction strategy stats reporting

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • StorEng - Defined Pipeline

      During a recent review of the strategy stats in WT, it was observed that there might be an incorrect update in the stats related to cache eviction. The current logic, in the provided code snippet, indicates that the system could misrepresent the state of eviction under certain conditions.

      if (!F_ISSET(cache, WT_CACHE_EVICT_DIRTY | WT_CACHE_EVICT_UPDATES))
          WT_STAT_CONN_INCR(session, cache_eviction_target_strategy_clean);
      else if (!F_ISSET(cache, WT_CACHE_EVICT_CLEAN)) {
          min_pages *= 10;
          WT_STAT_CONN_INCR(session, cache_eviction_target_strategy_dirty);
      } else
          WT_STAT_CONN_INCR(session, cache_eviction_target_strategy_both_clean_and_dirty); 

      For example, consider a situation where the update bytes reach the target levels, but neither clean nor dirty bytes have reached their thresholds. Based on the current conditional checks the strategy would be incorrectly marked as 'evict dirty pages.' This does not pose any logical issue to the code's functioning (except min_page *= 10), but it leads to a misrepresentation of the eviction strategy.

      Objective:

      The ticket aims to revise the logic used to update the cache eviction strategy stats to ensure an accurate representation of the system's state.

      Additional objective:

      Investigate if this assumption (updates only on dirty pages) is applied elsewhere in the system.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            1147952115@qq.com y yz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: