[SERVER-53684] Make the callback for the hello command in SingleServerDiscoveryMonitor not take the mutex if the command was canceled due to shut down Created: 11/Jan/21  Updated: 30/May/23  Resolved: 22/Jan/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Won't Do Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-53084 ServerDiscoveryMonitor::shutdown can ... Closed
Assigned Teams:
Sharding
Operating System: ALL
Participants:
Linked BF Score: 16

 Description   

Currently, the callback for the hello command sent by the SingleServerDiscoveryMonitor takes the mutex before checking for shut down. We could let a thread lock in the case where the ReplicaSetMonitor task executor thread acquires SingleServerDiscoveryMonitor's mutex when calling SingleServerDiscoveryMonitor::shutdown and then tries to acquire it again when calling the callback function after cancelling pending a hello command. To avoid this, the callback should not take the mutex if the status is CallbackCanceled. 


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