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

Fix cache logging code that assumes that pages are always 4KB

    • Storage Engines
    • 1
    • 2024-01-09 - I Grew Tired, StorEng - 2024-01-23

      Summary
      According to comments in __cache_pool_assess(), the code assumes that pages are 4KB when performing logging calculations. This could lead to incorrect logging results if the actual page size were not 4KB. See code extract below:
       

      *
      * Count pages read, assuming pages are 4KB.
      */
      tmp = cache->bytes_read >> 12;
      if (tmp >= cache->cp_saved_read)
        reads = tmp - cache->cp_saved_read;
      else
        reads = tmp;
      cache->cp_saved_read = tmp;

      Motivation

      • Does this affect any team outside of WT?
        No
      • How likely is it that this use case or problem will occur?
        Likely
      • If the problem does occur, what are the consequences and how severe are they?
        Logging is not correct
      • Is this issue urgent?
        No

      Acceptance Criteria (Definition of Done)
      The code is changed to use the actual page size, not an assumed one.

      • Documentation update
        No

            Assignee:
            adeline.chen@mongodb.com Adeline Chen (Inactive)
            Reporter:
            jeremy.thorp@mongodb.com Jeremy Thorp
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: