SERVER-139426ClosedFixed

Fix mirrored-read race in change_stream_read_preference.js test

jstests/sharding/query/change\_streams/change\_stream\_read\_preference.js samples $indexStats accesses.ops for the _id_ index on each shard secondary around the change\-stream getMore and asserts the delta is exactly 1 — the optimized post\-image update lookup. Mirrored reads can break that assertion: an update served by the shard primary is mirrored to a secondary as a synthesized find of its filter \(CmdUpdate::supportsReadMirroring, write\_commands.cpp\), recording an extra _id_ index acces

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1026
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.