[SERVER-36762] Disallow implicit collection creation through the config server during a cross shard transaction Created: 20/Aug/18  Updated: 27/Oct/23  Resolved: 12/Sep/18

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

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Randolph Tan
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Sharding 2018-09-10, Sharding 2018-09-24
Participants:

 Description   

Before a shard returns ErrorCodes::CannotImplicitCreateCollection, it catches the error and implicitly creates the collection through the config server. Implicit collection creation is disallowed during a single replica set transaction, so during a cross shard transaction this behavior should be disallowed as well.



 Comments   
Comment by Randolph Tan [ 12/Sep/18 ]

Among the set of commands allowed in multi statement transactions, only findAndModify and write commands can potentially create new collections. However,
It is currently not possible to hit the CannotImplicitlyCreateCollection exception because it will hit the OperationNotSupportedInTransaction assertion first (findAndModify & writeops).

Generated at Thu Feb 08 04:44:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.