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

Dumping cache debug info doesn't work for pages smaller than 1 MB

    • 3
    • Storage - Ra 2022-03-07

      Summary
      __verbose_dump_cache_single prints out the size of each page in cache, but when it does so it computes size as bytes / WT_MEGABYTE, and for small byte sizes under 1MB integer division truncates this to zero. There are other uses of x / WT_MEGABYTE that may behave similarly.

       

      Motivation
      Priority is P5 as we only see this when enabling debug traces and also dumping info about pages smaller than 1 MB. If encountered devs can easily change WT_MEGABYTE to WT_KILOBYTE as a temporary fix to continue with their task.

      Acceptance Criteria (Definition of Done)
      Performing a cache dump with small sized pages yields results like
      leaf: 1 pages, 228KB, 0/1 clean/dirty pages, 0/228/146 clean/dirty/updates KB, 228KB max page, 228KB max dirty page
      or
      leaf: 1 pages, 0.228MB, 0/1 clean/dirty pages, 0/0.228/0.146 clean/dirty/updates MB, 0.228MB max page, 0.228MB max dirty page
      rather than
      leaf: 1 pages, 0MB, 0/1 clean/dirty pages, 0/0/0 clean/dirty/updates MB, 0MB max page, 0MB max dirty page

            Assignee:
            clarisse.cheah@mongodb.com Clarisse Cheah
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: