-
Type:
Investigation
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
Developer Tools
Downstream Changes Summary
Project context
---------------
Change stream updateLookup resolves the fullDocument for update events via a point lookup on the
document's _id. With featureFlagChangeStreamOptimizedUpdateLookup on, the primary engine is
chosen by stream scope: collection-level streams use the SBE executor (fixed namespace - a
parameterized {_id: <value>} plan is compiled once and reused), while database- and cluster-wide
streams use the Express point-read executor (the namespace changes per event, so a cached SBE
plan buys nothing). Either primary may decline a lookup (unsupported _id shape, collation, ...),
in which case the routed Aggregation executor serves it as fallback. Each engine is instrumented
separately.
What this ticket adds
---------------------
The metrics.changeStreams.updateLookup.express.* serverStatus metrics (defined in SERVER-129512)
are now populated: the Express executor records its cell on every lookup it serves - database-/
cluster-wide streams when the optimization is on, plus any case where Express is the primary and
does not decline.
Metric semantics
----------------
Same model as the aggregation cell (SERVER-129513):
- found (counter) / notFound (counter) / notHandled (counter, decline - not an error, no latency).
- latencyMicros (histogram, microseconds), recorded only for executed lookups.
No new commands, options, response fields, or wire-protocol changes; no change to lookup results
- observability wiring only.
Description of Linked Ticket
Context
Express is the primary local executor for db / cluster-wide update-lookup streams (flag on).
Scope
- Add the recorder constructor parameter and the record* calls in ExpressSingleDocumentLookupExecutor.performLookup.
- The factory injects the updateLookupExpressStats cell.
Acceptance
A db/cluster-level stream with updates increments changeStreams.updateLookup.express.found / notFound + latency.
Tests
Extend the shared metrics jstest with the (flag on, db/cluster) branch: when the flag is on and
changeStreamPassthroughType() is kDb/kCluster, expect the express cell; flag off still expects
aggregation. No new file.
Dependencies
Depends on the metrics infrastructure ticket, ExpressSingleDocumentLookupExecutor (SERVER-128413), and
the Aggregation wiring ticket (which creates the shared jstest). Can run in parallel with the SBE
wiring ticket.
- depends on
-
SERVER-129514 Record updateLookup metrics from the Express lookup executor
-
- Closed
-