Expand description
Collecting history of request executions - retries, speculative, etc.
Structs§
- Attempt
History - Attempt
Id - Id of a single attempt within a request run - a single request sent on some connection.
- Fiber
History - History
Collector - HistoryCollector can be used as HistoryListener to collect all the request history events. Each event is marked with an UTC timestamp.
- History
Collector Data - Request
History - Request
Id - Id of a single request, i.e. a single call to Session::{query,execute}_{unpaged,single_page}/etc.
- Speculative
Id - Id of a speculative execution fiber. When speculative execution is enabled the driver will start multiple speculative threads, each of them performing sequential attempts.
- Structured
History - Structured representation of requests history.
HistoryCollector collects raw events which later can be converted to this pretty representation.
It has aDisplay
impl which can be used for printing pretty request history.
Enums§
Traits§
- History
Listener - Any type implementing this trait can be passed to Session
to collect execution history of specific requests.
In order to use it callset_history_listener
onQuery
,PreparedStatement
, etc…
The listener has to generate unique IDs for new requests, attempts and speculative fibers. These ids are then used by the caller to identify them.
It’s important to note that even after a request is finished there still might come events related to it. These events come from speculative futures that didn’t notice the request is done already.