Struct Ack
#[non_exhaustive]pub struct Ack {
pub appended: u64,
pub skipped: u64,
pub confirmed: Watermark,
pub responder: Option<StoreId>,
}Expand description
What the far side did with a push.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.appended: u64How many events the far side appended, excluding ones it already held.
skipped: u64How many events the far side already held and skipped.
Re-delivery is a no-op, not an error: a peer will see the same event more than once, and the count lets a runner tell a healthy overlap from a stuck resume token.
confirmed: WatermarkWhat the far side has now durably seen, per origin store.
A confirmation, deliberately not an event. Writing “peer X has seen up to Y” into the log would make every confirmation replicable, and two peers confirming each other’s confirmations is a log that grows without anyone doing anything.
responder: Option<StoreId>The store incarnation that answered, if the far side has one (ADR-0104). Declared last.
Implementations§
§impl Ack
impl Ack
pub const fn with_responder(self, responder: StoreId) -> Self
pub const fn with_responder(self, responder: StoreId) -> Self
Names the store incarnation that took this push (ADR-0104).
Ack::default names none, which is what a peer with no store of its
own says. A peer that ingests into a store says which, so a runner can
tell that the far side’s confirmed marks were
written by a different incarnation from the last answer’s: confirmations
alone cannot say that, because the next push raises them again.