The ScopedCollectionMetadata object is supposed to only be created by the MetadataManager since only it knows definitively what the current metadata for the collection is. Currently there are call sites which create ScopedCollectionMetadata using the default constructor, which makes it difficult to ensure correctness in one place.
Because of this we should remove all usages of the default constructor outside of MetadataManager.
- is depended on by
-
SERVER-32198 Missing collection metadata on the shard implies both UNSHARDED and "metadata not loaded yet"
- Closed