Potentially unreachable pages by Checkpoint Cleanup

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Checkpoints
    • None
    • Storage Engines - Persistence
    • SE Persistence - 2025-12-05
    • None

      HELP-83868 is suspected to be an instance where Checkpoint Cleanup doesn't reach certain pages, preventing the History Store from being truncated.

      The user has a very large setup - around 40k tables and terabytes of data. When Checkpoint Cleanup scans tables and pages, it quickly hits its limits (checkpoint_cleanup_obsolete_tw_pages_dirty_max and obsolete_tw_btree_max) which causes it to skip some pages.

      Proposed fix:
      1. When walking the tree, never skip internal pages (only apply the limit to leaf pages) here.
      2. When scanning btrees, do the History Store first since it's the most likely to have something to clean up, then continue with the rest of the collections here.
      3. When processing all collections, use a random cursor to choose the starting point and alternate the scanning direction here.
      Open question: what should happen when the cursor reaches the end? Should it wrap around, restart, or stop after a defined number of passes?

        1. log_en.stat
          5.92 MB
        2. log_disable.stat
          5.75 MB
        3. image-2025-11-17-14-10-16-781.png
          image-2025-11-17-14-10-16-781.png
          105 kB
        4. image-2025-11-17-14-08-53-930.png
          image-2025-11-17-14-08-53-930.png
          111 kB

            Assignee:
            Albert Song
            Reporter:
            Yury Ershov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: