The logic in CommonMongodProcessInterface::attachCursorSourceToPipelineForLocalRead performs shard versioning by UUID, even if namespace is available. The shard version comes from the previous call up the stack, which establishes the collection as expected UNSHARDED.
There are a couple of problems with this:
- Shard versioning by UUID is not something that we currently support in the protocol, unless the version is UNSHARDED. The protocol is always NSS -> ShardVersion and if instead of NSS we have UUID, there is currently no reliable way to infer what is the namespace that corresponds to that collection and we need to rely on the contents of the local catalog.
- We plan to get rid of UNSHARDED collections, which means this problem will get worse.
- related to
-
SERVER-75643 Not all paths of AutoGetCollectionForReadLockFreePITCatalog check for DBVersion
- Closed