-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Service Arch
-
ALL
-
5
After SERVER-39965, a scheduled task may run on the caller's thread rather than in the thread pool on shutdown. Since the scheduled task can acquire the replication mutex which may have been held by the caller, a deadlock will occur. Heartbeat schedule is an example.
Due to how heartbeat callbacks is tracked in _heartbeatHandles, it may not be straightforward to check the status and return before acquiring the lock.
Heartbeat cancellation has also to be considered when working on this ticket. When the heartbeat is cancelled while it's already running or scheduled but hasn't run yet, the ownership of the callback should be clarified. Currently, it's the cancelled callback's job to clear itself.
- has to be done after
-
SERVER-40769 Untrack heartbeat callbacks on heartbeat cancellation
- Closed
- is duplicated by
-
SERVER-40499 ReplicationCoordinatorImpl::_handleHeartbeatResponse should check for cancelation before taking mutex
- Closed
- is related to
-
SERVER-40795 Always execute ThreadPoolTaskExecutor callbacks on thread pool threads
- Closed
-
SERVER-39965 Make OutOfLineExecutor return a Status from schedule()
- Closed