[SERVER-55284] Get rid of the ScopedAllowImplicitCollectionCreate_UNSAFE marker Created: 18/Mar/21  Updated: 20/Sep/21  Resolved: 20/Sep/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-60092 Complete TODO listed in SERVER-55284 Closed
is related to SERVER-52778 Add markers for all places where coll... Closed
Participants:

 Description   

In SERVER-52778 we added the ScopedAllowImplicitCollectionCreate_UNSAFE marker RAII class, which allows only a fixed set of code paths to create collections in a Sharded cluster.

This ticket is the last part of a set of dependent tickets to remove it from the various implicit collection creation paths. When this ticket is ready to be worked on, we should just rename that utility to something more meaningful and only use it in the CreateCollection coordinator.

Without this ticket, implicitly created collections (through write to a non-existent collection for example) and those created through a call to create will not serialise with DropDatabase and could end-up getting lost.



 Comments   
Comment by Kaloian Manassiev [ 20/Sep/21 ]

The ScopedAllowImplicitCollectionCreate_UNSAFE marker was added as a means to catch all places, which create collection outside of the sharded create collection protocol. Such places are inherently unsafe to exist, because they do not synchronise with a concurrent sharded DDL, most notably dropDatabase.

While we have solved the dropDatabase synchronisation through the use of the database critical section, the markers should remain in place for when we start registering all collections in the sharded catalog.

Closing as Won't Do.

Generated at Thu Feb 08 05:36:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.