[SERVER-48498] Release RSM's mutex before notifying replica set change listener Created: 29/May/20  Updated: 29/Oct/23  Resolved: 01/Jun/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.4.0-rc8, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Janna Golden Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Sharding 2020-06-01, Sharding 2020-06-15
Participants:
Linked BF Score: 18

 Description   

In StreamableReplicaSetMonitor::onTopologyDescriptionChangedEvent, we take the RSM's mutex and continue to hold it when notifying the replica set change listener on confirmed set and possible set which updates the ShardRegistry. We should release the RSM's mutex when notifying the RSCL to avoid deadlock with another thread that attempts to access the RSM from the ShardRegistry, namely when another thread is reloading the ShardRegistry and attempts to drop the RSM in question.



 Comments   
Comment by Githook User [ 02/Jun/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-48498 Release RSM's mutex before notifying replica set change listener

(cherry picked from commit 912d0ead151bc3a5cac261f07c8453a35a73ad10)
Branch: v4.4
https://github.com/mongodb/mongo/commit/bd8e9b72e85cea81376c212ae73ee0094e22158f

Comment by Githook User [ 01/Jun/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-48498 Release RSM's mutex before notifying replica set change listener
Branch: master
https://github.com/mongodb/mongo/commit/912d0ead151bc3a5cac261f07c8453a35a73ad10

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