Leaf page-size histogram uses maxleafpage instead of pre-compression budget

XMLWordPrintableJSON

    • Storage Engines
    • 290.801
    • None
    • None

      Problem

      Size-stats measure uncompressed leaf images (dsk->mem_size). With compression adjust on, reconciliation budgets against maxleafpage_precomp (often ~4x maxleafpage, e.g. 128 KiB for 32 KiB collection leaves) then compresses toward maxleafpage on disk.

      The leaf page-size histogram still ceilings at maxleafpage, so well-compressing collection leaves all land in the open-ended bucket and fullness vs maxleafpage looks nonsensical (~350% full). Indexes look sane because they compress less.

      Change

      * Add size-stats btree_size_leaf_hist_buckets and btree_size_leaf_hist_ceiling so consumers (Mongo log labels) do not hardcode histogram geometry.
      * Bucket and publish the ceiling from maxleafpage_precomp (fallback maxleafpage if 0).
      * Keep Mongo labeling for a follow-up SERVER ticket after this is imported.

      Test

      * test/suite/test_size_stats01.py: buckets == 9; with no compressor, ceiling == maxleafpage; existing underfull / mean-fill asserts still hold.

            Assignee:
            Luke Pearson
            Reporter:
            Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: