-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
Platforms 2018-07-16, Platforms 2018-07-30, Platforms 2018-08-13, Platforms 2018-09-24
-
27
Add support for a generalized interruptibility facility in the server.
This offers a generalized interruptibility facility, trialed inFuture<T> and ProducerConsumerQueue<T>.
It offers 3 major concepts:
Notifyable: A type which can notified off-thread, causing a wake up from some kind of blocking wait
Waitable: A type which is Notifyable, and also can perform work while in a ready-to-receive notification state. static methods offer support for running underneath condition_variable::wait's. The chief implementer is the transport layer baton type
Interruptible: A type which can wait on condition variables, and offers:
- deadlines. This means the type integrates some sort of clock source
- interruptibility. This means the type offers a way of noticing that it should no longer run via status or exception
Additionally, Interruptible's offer special scoped guards which offer
- Exemption from interruption in a region defined by the lifetime of a guard object
- Subsidiary deadlines which can trigger recursively, offering specialized timeout and status return support.
The series of virtual types allows us to slice the interface between opCtx and future such that opctx can use future and future can use opctx. Additionally, cutting out more functionality allows us to flow a noop interruptibility type which unifies our waiting behind a common api.
- duplicates
-
SERVER-21005 Consistent maxTimeMs / timeout / interruption support
- Closed
- is duplicated by
-
SERVER-23625 Some read-only operations (eg count,aggregate) hang indefinitely if the primary for the shard is unreachable from mongos
- Closed