SERVER-134519ClosedFixed

Mongos may fail to populate CollectionUUIDMismatch properly if dbPrimary returns a different error

CollectionUUIDMismatch today is populated with the actualCollection namespace almost universally by contacting the dbPrimary shard in the event of a failure. However, the only place that doesn't do this is the find command on mongos. If it knows that the request targeted the dbPrimary it assumes that the error has been already populated by the dbPrimary response and [skips the call to it|https://github.com/mongodb/mongo/blob/40a624b8e02075d780f72b7142f437f8df3a2f40/src/mongo/s/query/planner/c

Affected Versions
Versions known to exhibit this issue
6.0.299.0.18.3.118.0.327.0.43
Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10249.0.7
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
bkp