[SERVER-46865] collMod should not take database MODE_X lock Created: 13/Mar/20  Updated: 29/Oct/23  Resolved: 01/Apr/20

Status: Closed
Project: Core Server
Component/s: Catalog, Storage
Affects Version/s: None
Fix Version/s: 4.2.6, 4.4.0-rc0, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Geert Bosch Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-46874 Create view becomes very slow when sy... Closed
Related
related to SERVER-60312 [POC] use collMod to change a non-uni... Closed
is related to SERVER-47162 aggregate() namespace resolution and ... Closed
is related to DOCS-15998 [Server] collMod resource locking is ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2
Sprint: Execution Team 2020-03-23, Execution Team 2020-04-06
Participants:

 Description   

Because of ancient MMAPv1 storage engine heritage, the collMod command still locks the database using a MODE_X lock.



 Comments   
Comment by Githook User [ 03/Apr/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-46865 Make collMod not take database MODE_X lock

(cherry picked from commit 616780c320e7da17e7d1425cea5b13a56cccfd4d)
Branch: v4.2
https://github.com/mongodb/mongo/commit/4be21a34f7130d4756d04f919f87f41da5b90c39

Comment by Gregory Noma [ 02/Apr/20 ]

xiaoqiang.chou@gmail.com Glad to hear that it helped with your collMod performance! It was reverted temporarily due to a test failure that it caused, but it's back in now!

Comment by Githook User [ 02/Apr/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-46865 Make collMod not take database MODE_X lock

(cherry picked from commit e2e5505c2975bfd8a355229c8e85cd0c560d3a0e)
Branch: v4.4
https://github.com/mongodb/mongo/commit/848c60bcb8257981615bbb0e29894da5f7f912ec

Comment by Githook User [ 01/Apr/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-46865 Make collMod not take database MODE_X lock
Branch: master
https://github.com/mongodb/mongo/commit/616780c320e7da17e7d1425cea5b13a56cccfd4d

Comment by Xiaoqiang Zhou [ 01/Apr/20 ]

Why is commit "80ebcc52a6ec27834a286ab1ab342db0d7f63756" reverted?

It did make collMod (update view) a lot faster. createView remains slow though

Comment by Githook User [ 30/Mar/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: Revert "SERVER-46865 Make collMod not take database MODE_X lock"

This reverts commit 80ebcc52a6ec27834a286ab1ab342db0d7f63756.
Branch: master
https://github.com/mongodb/mongo/commit/d92d49a727a3ad8a69e2abcc28ab14364abff17a

Comment by Githook User [ 24/Mar/20 ]

Author:

{'name': 'Gregory Noma', 'username': 'gregorynoma', 'email': 'gregory.noma@gmail.com'}

Message: SERVER-46865 Make collMod not take database MODE_X lock
Branch: master
https://github.com/mongodb/mongo/commit/80ebcc52a6ec27834a286ab1ab342db0d7f63756

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