-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-06-22
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Summary
First consumption of featureFlagChangeStreamOptimizedUpdateLookup (SERVER-117887). Wire the
Express executor live for every replica-set / non-sharded change stream so local updateLookups
bypass the heavyweight routed lookupSingleDocument. This is the first optimized path and the
first new behaviour.
Scope
- Gate the executor factory in change_stream_add_post_image_stage_fn.cpp:
- Flag off -> Aggregation-only chain (M1 behaviour, byte-for-byte master).
- Flag on, replica set / non-sharded -> AlwaysLocal + Express, with the Aggregation fallback.
- Flag on, sharded -> always-decline eligibility, so the lookup routes through the unchanged
Aggregation fallback.
- Enable Express uniformly across collection / db / cluster streams. Per-stream-type refinement
(collection-level -> SBE) is deferred to M3.
Files
- src/mongo/db/exec/agg/change_stream_add_post_image_stage_fn.cpp
Acceptance criteria
- With the flag off, output is byte-for-byte master.
- With the flag on, replica-set change_streams and change_streams_secondary_reads suites
are green and the Express path is exercised; fullDocument is byte-identical to master. - Sharded deployments provably fall back (no behaviour change).
Dependencies
Depends on SERVER-117887
, SERVER-128410 (Aggregation-only rewire), SERVER-128413 (Express
executor).
- is related to
-
SERVER-117887 Create feature flag
-
- Closed
-
-
SERVER-128410 Route ChangeStreamUpdateLookupStage through SingleDocumentLookupExecutor (Aggregation-only)
-
- Closed
-
-
SERVER-128413 Implement ExpressSingleDocumentLookupExecutor for change-stream updateLookup
-
- Closed
-
- related to
-
SERVER-129172 Refactor ChangeStreamUpdateLookupStage onto the BatchedEnrichmentStage primitive
-
- Backlog
-
-
SERVER-128415 Add getMore kill-and-resume seam for featureFlagChangeStreamOptimizedUpdateLookup
-
- In Progress
-
-
SERVER-128963 Move the Express plan executor into its own library so it links without query_exec
-
- Closed
-