-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We want per-collection/index on-disk size analytics (page counts and bytes by page type, key/value bytes and counts, and a leaf page-size histogram) without paying for a separate tree walk. collHash validation already scans every b-tree, so we piggyback on that scan.
Work:
- Thread a size-stats flag from ValidationOptions through the RecoveryUnit onto the WiredTiger cursors used by the collHash record-store and index scans, so those cursors open with debug=(size_stats).
- Size-stats cursors bypass the cursor cache and are closed (not released) so each scan resets and re-accumulates cleanly.
- After each scan, read the accumulated stats off the b-tree data handle and log one summary line per collection/index (LOGV2 10930500), reporting the on-disk file URI.
- Added a btree_size_no_image_pages counter to quantify pages skipped for lacking an on-disk image.
- Behavior: sizeStats:true requires collHash:true; plain collHash validation stays silent and incurs no extra work. Available via the validate command and --validate startup (collectionValidateOptions).
Testing: Covered by jstests/noPassthrough/validate/collhash_size_metrics.js.
- depends on
-
WT-17868 Add a new debug mode to WiredTiger that gathers statistics about page sizes
-
- Closed
-
- related to
-
SERVER-132467 Improve WiredTigerCursor usage in validation metrics gathering code
-
- Backlog
-