pub enum DeadlineOutcomeInto {
Reply(usize),
SendFailed,
PeerDied,
QueueFull,
Timeout,
}Expand description
Outcome of ServiceContext::request_with_reply_deadline_outcome_into - the buffer-writing twin
of DeadlineOutcome.
It exists because the _into form collapsed all four outcomes into Option<usize>, and the two
that matter are OPPOSITES. SendFailed means the request never left, so nothing can arrive late
and retrying after a reacquire is safe. Timeout means it DID leave, so a late reply is still
coming and re-sending desyncs the protocol - every later reply is matched to the wrong request.
A caller handed None cannot tell those apart, so it must either never retry (and stay broken
after a peer restarts) or always retry (and desync). fs had the first of those.
Variants§
Reply(usize)
A reply arrived; the payload is in the caller’s buffer, this many bytes of it.
SendFailed
The send never left: the peer’s cap is stale or its name does not currently resolve. Nothing is in flight. Reacquire by name and retry ONCE - this is the only safe retry.
PeerDied
The request WAS delivered, and the peer died holding it (ReplyDead, 8.6), so the work may
have been done. Re-send only an operation that is safe to repeat (a block read, a rewrite of
the same sector). It was folded into SendFailed until 2026-10-10 (backlog/fixed/80 S3); gs::call
has kept the two apart all along, as Error::PeerDied against Error::Unreachable.
QueueFull
The peer’s queue was full. The request did not leave either, but the peer is alive and busy.
Timeout
The request was delivered and no reply came in time. Do NOT re-send.