[SERVER-39516] Use database MODE_IX lock for creating collections Created: 11/Feb/19  Updated: 29/Oct/23  Resolved: 18/Apr/19

Status: Closed
Project: Core Server
Component/s: Catalog, Storage
Affects Version/s: None
Fix Version/s: 4.1.11

Type: Improvement Priority: Major - P3
Reporter: Geert Bosch Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2019-04-08, Storage NYC 2019-04-22
Participants:
Story Points: 8

 Description   

Remove the database MODE_X lock for collection creation.
Add tests that verify that collection creation no longer blocks on open transactions accessing different collections in the same database.



 Comments   
Comment by Geert Bosch [ 08/Jun/20 ]

No, it's not reasonable or really even possible: you'd end up with something that is much closer to MongoDB 4.2 than MongoDB 4.0.

Comment by Sergey G [ 01/Jun/20 ]

Hello.  Is it possible to backport this change (and related lock relaxations) to v4.0?  Also, if mongoDB is unlikely to do so, I'd appreciate advice on whether it's reasonable to attempt a private backport.  Thank you!

Comment by Githook User [ 18/Apr/19 ]

Author:

{'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: SERVER-39516 Use database MODE_IX lock for creating collection
Branch: master
https://github.com/mongodb/mongo/commit/5ad20825e2c02b14f1aeb5bfb4dcc0b4dce927b2

Comment by Geert Bosch [ 08/Apr/19 ]

HI Yuri, we understand that these course locks are more of a problem with transactional workloads. We are working toward making our locks more fine grained, as this JIRA issue shows. We can not give you an ETA, but please watch this ticket for updates. We appreciate your feedback, and use input such as yours for our planning and scheduling.

Comment by Yuri Sokolovski [ 28/Mar/19 ]

We have encountered this issue while testing our use-case, which consists of concurrent transactional operations by user1, collection DDL operations by user2, and non-transactional find() operation on an unrelated collection by user1.

We're experiencing a deadlock because DDL is blocked by an active transaction and non-transactional find executed out-of-transaction is blocked by a DDL.

As a result we have to work around of this restriction by creating multiple databases in order to avoid the deadlock.

If you could give us an ETA for this feature that would really help.

 

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