pub struct ProgressTracker { /* private fields */ }Expand description
See the module docs. Single-thread (Db) semantics; one instance per server.
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn new(initial_cv: u64) -> ProgressTracker
pub fn new(initial_cv: u64) -> ProgressTracker
Open at the replica’s current committed watermark
(Db::committed_tx_id).
Sourcepub fn disconnect(&mut self, conn: u64)
pub fn disconnect(&mut self, conn: u64)
Drop a connection and its query registrations.
Sourcepub fn add_query(&mut self, conn: u64, query: QueryId, hydrated_cv: u64)
pub fn add_query(&mut self, conn: u64, query: QueryId, hydrated_cv: u64)
Register a live query on conn, known-current as of its hydrate watermark.
Sourcepub fn remove_query(&mut self, conn: u64, query: QueryId)
pub fn remove_query(&mut self, conn: u64, query: QueryId)
Deregister a query (unsubscribed / destroyed) so it no longer pins cv_min.
Sourcepub fn note_commit(
&mut self,
cv: u64,
changed: &[QueryId],
) -> Vec<(u64, ProgressFrame)>
pub fn note_commit( &mut self, cv: u64, changed: &[QueryId], ) -> Vec<(u64, ProgressFrame)>
Fold one committed transaction in: cv (the commit’s TxId) and the queries
whose results changed (the subscriptions that fired — a client’s own lmid
advance fires its system query, so it is in here like any data change).
Advances every query’s known-current cv (single-thread semantics — see module
docs) and returns the poke set: (conn, frame) for exactly the connections the
poke rule selects, in connection-id order.