[SERVER-72897] Investigate unorthodox locking in ReplicationCoordinatorExternalState Created: 17/Jan/23  Updated: 29/Oct/23  Resolved: 24/Feb/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Improvement Priority: Minor - P4
Reporter: Jordi Olivares Provencio Assignee: Jiawei Yang
Resolution: Fixed Votes: 0
Labels: neweng, repl-shortlist
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-48399 Writing config document to "local.sys... Closed
Related
related to SERVER-71198 Assert that unkillable operations tha... Backlog
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-02-20, Repl 2023-03-06
Participants:

 Description   

As part of SERVER-71198 we discovered that the locking performed in the class takes a MODE_X lock for the local database and then performs operation on a single collection without locking it.

Instead the process should take the collection lock via AutoGetCollection in the required mode to avoid unnecessary strong locks in the database.



 Comments   
Comment by Githook User [ 24/Feb/23 ]

Author:

{'name': 'Jiawei Yang', 'email': 'jiawei.yang@mongodb.com', 'username': 'YoungYang0820'}

Message: SERVER-72897 change X-dblock to X-collectionlock when updating local config document

change storeLocalConfigDocument to use X lock
Branch: master
https://github.com/mongodb/mongo/commit/95093470914620834556c640af8746eaaf138cd1

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