-
Type:
Sub-task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Storage Execution 2026-05-11
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Replace the per-record OplogEntry::parse and the duplicated repl::ApplyOps::extractOperationsTo traversals in aggregateSizeCountDeltasInOplog with a private BSON-view path that reads only the fields we actually consume.
This keeps the existing OpSizeCountExtractable concept and extractSizeCountDeltaForOpImpl template intact for the typed-input call sites. Two extractors live side by side, with a clear split: the BSON-view path drives the cursor scan, the typed template path drives op-observer / oplog-applier callers that already hold parsed objects.
Correctness checklist:
- Tenant inheritance preserved: applyOps with tid only at the outer level produces the same NamespaceString for inner ops .
- m array variant on commitTransaction continues to contribute no delta (rejected by the type check on m).
- m inheritance from outer to inner op (when inner lacks m) matches today's behavior.
- kCreate / kDrop fast-count-store detection produces the same result as CommandHelpers::parseNsCollectionRequired for valid input.
- lastTimestamp is advanced for the same set of entries as today.
- All existing log IDs and severity levels preserved and massert IDs and messages preserved.
Acceptance criteria:
- Public interface of aggregateSizeCountDeltasInOplog unchanged.
- No behavior change in deltas, advanced timestamps, or emitted metrics.
- Existing replicated_fast_count_test.cpp and replicated_fast_count_metrics_test.cpp pass unchanged.
- New focused test for the newly added code.
- Benchmark from the parent's sub-task shows a measurable improvement on the scan workloads, attached to the PR description as a delta against the master baseline.
- ReplOperation aggregation path is untouched and shows no regression.