-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-07-20, QE 2026-08-03
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Context
On a sharded cluster the SBE/Express primary returns kNotHandled when the post-image no longer lives
on the shard observing the update — caused by moveChunk, moveCollection, reshardCollection, etc.
PrimaryWithFallback then calls the Aggregation fallback. This is the genuine production trigger for
the aggregation cell and the only place the primary->fallback handoff is observable; it cannot be
reached on a replset (as lookups are always local).
Scope
Test-only (the executor wiring is done in the per-engine tickets). A dedicated test with its own
ShardingTest that controls placement and asserts metric deltas after each DDL op.
Acceptance / test matrix
New jstests/sharding/query/change_streams/change_stream_metrics_update_lookup.js. For each of
moveChunk, moveCollection, reshardCollection (and any op that relocates the post-image or changes the
UUID): place a doc, open a collection change stream, perform the op so the post-image becomes remote
or the UUID changes, update the doc, then assert (helpers already exist):
- updateLookup.{express, sbe}.notHandled +1 (primary declined), and
- updateLookup.aggregation.found +1 (fallback handled it).
Also assert the deleted/absent post-image case routes to aggregation.notFound.
- depends on
-
SERVER-131661 Move change_stream_metrics_util.js under libs
-
- Closed
-