-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
In SERVER-94563 we made CollectionWriter the only way of modifying a collection instance.
In doing so we maintained the legacy behaviour of AutoGetCollection::getWritableCollection that updates the AutoGetCollection's internal CollectionPtr to point to the new writable instance. However, this is a difference in behaviour from the replacement Shard Role acquisitions. Acquisitions instead make their internal CollectionPtr a nullptr to mark themselves invalid. Accessing the acquisition's collection will deliberately crash the server in such an event.
As a result, we have two differing behaviours. Ideally we should only do the latter since that's what acquisitions do.
This ticket is about looking at instances of CollectionWriter that use AutoGetCollection and see if they access the writable collection through the AutoGetCollection instead of the writer. If none exist then we should ideally modify the behaviour to stay in line with acquisitions.
- related to
-
SERVER-94563 Enforce writable collection usage through the CollectionWriter
- In Code Review