-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Page deltas
-
None
-
Storage Engines - Transactions
-
146.826
-
SE Transactions - 2026-10-23
-
5
WiredTiger maintains two history store instances: a local history store (used by ordinary, non-disaggregated tables) and a shared history store (used by disaggregated/layered tables). The local HS never produces delta images — it is never marked WT_BTREE_DISAGGREGATED, so it always writes full page images. This is intentional and not in question, so no dedicated stat is needed to confirm it.
The shared HS, however, is delta-eligible, and no existing WiredTiger or MongoDB statistic could previously isolate its actual delta-vs-full-image behavior. The existing connection-wide reconciliation counters (rec_page_full_image_leaf, rec_page_full_image_internal, rec_page_delta_leaf, rec_page_delta_internal) blend writes from regular tables, the oplog, the local HS, and the shared HS into a single total — there is no way to isolate the shared HS's contribution after the fact. On the MongoDB side, serverStatus.wiredTiger.historyStorageStats is hardcoded to query only the local HS file (statistics:file:WiredTigerHS.wt); it has no visibility into the shared HS at all.
This gap made it impossible to directly verify claims about the history store's share of full-image write volume (see WT-15159), since the shared HS had no dedicated stat to measure it against.
Proposed change: add 4 new reconciliation statistics, dual-tracked at both connection and per-data-source scope:
- rec_page_full_image_shared_hs_leaf
- rec_page_full_image_shared_hs_internal
- rec_page_delta_shared_hs_leaf
- rec_page_delta_shared_hs_internal
No equivalent local-HS stats are added — the local HS's full-image rate is always 100% by construction, so a dedicated stat would carry no new information.
Classification is done at the point of reconciliation in rec_write.c, via a new macro in meta.h:
- WT_IS_SHARED_HS(btree) — WT_IS_HS(dhandle) && F_ISSET(btree, WT_BTREE_DISAGGREGATED)
Because these are dual-tracked via WT_STAT_CONN_DSRC_INCR, the connection-wide versions automatically surface through MongoDB's serverStatus.wiredTiger.reconciliation.* — no MongoDB-side code change is required for them to appear in FTDC once MongoDB is built against an updated WiredTiger.
Validated locally (WT Python test suite, disaggregated-storage connection) and against a real sys-perf patch build (YCSB workloads on disagg-m8g-perf-11-node.arm.aws and perf-atlas-dsc.arm.aws) — see WT-15159 for the resulting findings.
- is related to
-
WT-15159 Confirm delta reconciliation behavior on history store
-
- Closed
-