pub enum Notification {
Batch {
watch: WatchId,
changes: Vec<Change>,
},
Desync {
watch: WatchId,
cause: DesyncCause,
},
Completion {
watch: WatchId,
outcome: Outcome,
},
Suspended {
watch: WatchId,
},
Resumed {
watch: WatchId,
},
Established {
watch: WatchId,
mode: WatchMode,
},
RetryQuestion {
watch: WatchId,
operation: FaultOperation,
detail: FaultDetail,
},
VolumeChanged {
watch: WatchId,
previous: VolumeIdentity,
current: VolumeIdentity,
},
}Expand description
One item a client receives, always tagged with the subscription it belongs to.
Changes and desyncs ride the same queue so their order relative to one another
is well defined within a subscription (D-12): a client that sees a Desync
knows every change enqueued before it, and none after, is accounted for.
Variants§
Batch
The changes one completion carried, in the order the kernel reported them.
Fields
Desync
Changes were lost; the client should re-scan (D-12).
Fields
cause: DesyncCauseHow the gap arose. Advisory for the four recoverable causes – the
response is a re-scan either way – but
DesyncCause::Stopped is terminal and must be matched on.
Completion
A request the client made has been serviced (D-30).
Carried on this queue rather than a side channel so that its ordering against data is structural rather than temporal.
Suspended
The watch stopped delivering while the monitor works to re-establish it
(D-14/D-15/D-31). Opt-in via WatchOptions::report_liveness (D-13).
Resumed
The watch is delivering again after a Notification::Suspended. A
Notification::Desync { Reestablished }
always precedes or accompanies this, since the gap it bridges may have
hidden changes. Opt-in (D-13).
Established
Which tier is actually watching this subscription’s target, reported
once at first establishment and again after every re-establishment:
WatchMode::Detailed or the WatchMode::Coarse fallback (D-17).
Opt-in (D-13).
RetryQuestion
The monitor is asking this interactive subscription (D-27) how long
to wait before the next attempt. Answer through
crate::session::Session::answer; an explicit answer(watch, None)
declines, which is counted at the operation’s default delay – never
answering at all leaves the question outstanding indefinitely. This is
the one message a fault protocol cannot afford to lose, so it rides a
standing reservation (Sender::reserve_standing) taken once at
registration rather than the best-effort path – sound because a watcher
cannot fault twice concurrently (D-28), so at most one question per
subscription is ever outstanding.
Fields
operation: FaultOperationWhich operation faulted.
detail: FaultDetailThe classification and raw code behind the failure (D-79).
VolumeChanged
A path-based reopen landed on a different volume than this
subscription started on, and it opted into
crate::VolumeChangePolicy::Confirm (D-78/M12). Answer through
crate::session::Session::answer_volume_change;
crate::VolumeChangeDecision::Stop removes just this subscription,
crate::VolumeChangeDecision::Continue keeps it running against the
new volume. Rides the same standing reservation RetryQuestion does
(never outstanding at the same time for one subscription, D-28).
Fields
previous: VolumeIdentityThe volume this subscription was previously confirmed on.
current: VolumeIdentityThe volume the reopen just landed on.