-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
131
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
We must ensure that a Fetcher may be immediately destroyed after emplacing a value in the Fetcher::_completionPromise. This prevents deadlock since the Fetcher destructor calls shutdown which also acquires the Fetcher::_mutex.
Consider the following snippet:
{
auto fetcher = makeFetcherSharedPointer(...);
fetcher.onCompletion().thenRunOn(executorWhichRejectsWork).then([fetcher] {
// this will never run
});
}
An executor which rejects work (likely due to being shutdown) will never run the completion, and so the fetcher destructor will be run inline with the fulfillment of the future.
- related to
-
SERVER-62185 Ensure TenantMigrationRecipentService Fetcher instance survives future completion
-
- Closed
-