[SERVER-37676] Implicit collection creation is allowed in aborted transactions Created: 19/Oct/18  Updated: 29/Oct/23  Resolved: 12/Nov/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 4.0.3, 4.1.4
Fix Version/s: 4.0.5

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-11-05, Repl 2018-11-19
Participants:
Linked BF Score: 0

 Description   

We do not allow you to implicitly create a collection in a transaction. This check is performed using inMultiDocumentTransaction(). However, if the transaction has been killed since the operation started running, inMultiDocumentTransaction() will return false, and we will allow you to implicitly create a collection. On the 4.0 branch, we should fix this by instead checking inActiveOrKilledMultiDocumentTransaction(). On master, this will be fixed by SERVER-37244, which ensures that the transaction state cannot change while the session is checked out.



 Comments   
Comment by Githook User [ 12/Nov/18 ]

Author:

{'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}

Message: SERVER-37676 Remove unsafe inMultiDocumentTransaction()
Branch: v4.0
https://github.com/mongodb/mongo/commit/0c6924a93c1d4ac81df8d710544901444d631127

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