[SERVER-47358] Only use collection MODE_X in verifySystemIndexes Created: 06/Apr/20  Updated: 29/Oct/23  Resolved: 07/Apr/20

Status: Closed
Project: Core Server
Component/s: Concurrency, Storage
Affects Version/s: None
Fix Version/s: 4.4.0-rc1, 4.7.0

Type: Improvement Priority: Minor - P4
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
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Execution Team 2020-04-20
Participants:

 Description   

At system_index.cpp a database MODE_X lock is used, while only a collection MODE_X is required. The code should use AutoGetCollection instead of AutoGetDb.



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

Author:

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

Message: SERVER-47358 Take collection MODE_X locks instead of database MODE_X lock in verifySystemIndexes

(cherry picked from commit 917be65878a4738d89420b0b6328134122e0385c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/677ccbe53ba01ab5e638b23d65e4e84c9b09ea0b

Comment by Githook User [ 07/Apr/20 ]

Author:

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

Message: SERVER-47358 Take collection MODE_X locks instead of database MODE_X lock in verifySystemIndexes
Branch: master
https://github.com/mongodb/mongo/commit/917be65878a4738d89420b0b6328134122e0385c

Comment by Geert Bosch [ 06/Apr/20 ]

Actually, this really should be able to be MODE_IX, but I don't think it matters much at this point.

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