pub enum ClusterEvent {
Update {
query_id: QueryId,
update: Update,
},
Faulted {
query_id: QueryId,
reason: String,
cause: FaultCause,
},
Progressed {
worker: usize,
tx_id: TxId,
},
}Expand description
Events from a Cluster’s bounded channel. Registration emits a committed
Hydrated baseline. Later Changed slices can arrive before the transaction
commits. Buffer them until Progressed from the worker that hosts the query.
For a combined result across workers, wait for every relevant worker.
Faulted is terminal. Discard provisional changes for that query and re-register
for a fresh baseline. Derivation failures, worker loss, and rollback after
speculative delivery can fault a query; no further updates follow for that registration.
Faulted lives here, not as an Update variant, because it is an out-of-band
lifecycle signal, not an incremental data change — and the single-thread Db
never produces it (its ordinary derive errors abort the transaction; a
delta-overflow shed re-delivers Update::Hydrated instead).
Variants§
Update
A query’s incremental update.
Faulted
A query was destroyed after a derivation fault on its worker; reason
describes the underlying error and cause classifies it — a push-deadline
bail must survive to the host distinguishable from an ordinary derive fault
(FOLLOWER-LAG-SHED §6.6: it is shed trigger (b)). No further events arrive
for this query.
Progressed
Transaction tx_id committed, and worker emitted all its Changed slices
before this marker on the same ordered channel. Receiving this event permits
release of that worker’s buffered changes. It does not acknowledge application
callbacks or downstream transport delivery.
A combined subscription waits for every relevant worker before advancing
cv_min. The marker also advances queries whose results did not change.
Trait Implementations§
Source§impl Clone for ClusterEvent
impl Clone for ClusterEvent
Source§fn clone(&self) -> ClusterEvent
fn clone(&self) -> ClusterEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more