[SERVER-42340] ReplicaSetMonitor throws to the top of the event loop Created: 22/Jul/19  Updated: 24/Jul/19  Resolved: 24/Jul/19

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

Type: Bug Priority: Major - P3
Reporter: Mira Carey Assignee: Benjamin Caimano (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-41851 Expedited scans in the RSM can contin... Closed
Operating System: ALL
Participants:
Linked BF Score: 55

 Description   

The replica set monitor throws in Refresher::scheduleNetworkRequests if the underlying executor refuses work. This can cause an exception to throw up to the top of the event loop and terminate the process. It only happens on shutdown, but we should do a better job there and not crash in that scenario.

See where we uassertStatusOK and where we call scheduleNetworkRequests without a try/catch block in a callback



 Comments   
Comment by Benjamin Caimano (Inactive) [ 24/Jul/19 ]

Fixed this in a driveby during SERVER-41851. It now looks like this and uses isShutdownError() to guard against expected errors.

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