-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
2
-
🟦 Shard Catalog
-
None
-
None
-
None
-
None
-
None
-
None
Some commands accept a UUID as input instead of the namespace. One of those being count. These commands perform a UUID --> Namespace translation at the authorization layer / command instantiation. This is performed consulting the catalog at a point where there is no storage snapshot to establish a consistent catalog for. Thus the translation is done at latest.
The issue for count specifically is that this translated namespace is stored and used during command execution. The provided UUID might have been renamed after the authz check, and by the time the command execution opens a snapshot and establishes a consistent catalog. This leads to executing count against the old namespace in a snapshot where the UUID corresponds to a new name, and incorrectly returning a count of 0 (or less likely other values if the old namespace was reused in that window).
Another consequence is that when interleaved with drop, instead of returning NamespaceNotFound as is the usual for non-existing UUIDs, count will return n=0. Or less likely, if the old namespace was reused with a different UUID, incorrect results.
- is related to
-
SERVER-104827 CollectionCatalog::lookupCollectionBy* do not consider commit-pending collections
-
- Open
-