#[non_exhaustive]pub enum RevocationOutcome {
Requested,
Drained,
Forced,
Cancelled,
}Expand description
Outcome of one split revocation (the outcome label on
spate_coordination_revocations_total) — the leader moving a split away
from a live owner by dropping it from that owner’s assignment.
All four count on the releasing worker, so they read as one
lifecycle rather than as two sides of a negotiation: Requested is the
denominator, and every revocation that leaves it terminates in exactly
one of Drained, Forced, or Cancelled — including the paths that do
not look like a revocation ending at all, where the split completes or is
failed mid-drain, or the process departs while draining.
requested - drained - forced - cancelled is therefore the revocations
still in flight.
That is not the same number as spate_coordination_splits_draining, which
counts drains. Cancelled ends a revocation while leaving its drain
running, so the gauge sits one higher than the counter arithmetic for as
long as that drain takes. Two questions, two series: “how much is the
leader still trying to move” and “how many splits are winding down”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Requested
The leader stopped naming this split in the worker’s assignment, so the cooperative drain began: stop intake at a safe boundary, chase the tail to a final fenced commit, release.
Drained
The drain finished cooperatively: the tail committed and the release
landed, so the next owner resumes past everything this worker
emitted and replays nothing. The outcome the cooperative path exists
to produce; the gaining side counts
AcquireReason::Reassigned. A split that completes mid-drain
counts here too — its tail is committed and nothing replays, which
is the same outcome even though nobody took it over.
Forced
The cooperative path did not finish, so the release was forced: the
source declined to stop at a safe boundary, the drain outran
drain_deadline, or the split was fenced away before the release
landed. The uncommitted tail replays under the next owner. A decline
and an elapsed deadline are one outcome on purpose — the leader’s
revocation is a decision, not a request, so both end the same way
and differ only in how long the fleet waited to find out.
Cancelled
The leader took the revocation back: it named the split for this
worker again while this worker still held it, so the pending forced
release was dropped. Nothing is waiting for the split any more, so a
drain that is merely slower than drain_deadline gets to finish
cleanly instead of being charged a replay for a move nobody wants.
That is the whole of what cancelling buys — a drain that finishes
inside the deadline was never going to be forced anyway.
This counts the revocation ending, not the drain, and the two then diverge:
- If the source had already stopped intake, the drain runs on
(resuming stopped intake is a seam sources do not have). It ends by
handing the split back, and this worker re-claims it
(
AcquireReason::Reassigned) replay-free — one lane teardown and re-open, counted under neitherdrainednordrain_duration_seconds, because by then it is not a revocation ending.splits_drainingstays up until it lands. - If the source declined, or was never asked, nothing stopped and nothing leaves: the split simply stays, still being read.
A cancelled drain is still bounded, just by silence rather than by
the deadline: if it commits nothing at all for drain_deadline the
split is released anyway and re-claimed with a fresh lane, because a
drain that never finishes would otherwise leave it owned, leased,
and read by nobody. That release counts a
SplitLossReason::Revoked and no second revocation outcome.
Sustained cancelled means the fleet’s membership is flapping faster
than a drain takes: look at pod churn and at drain_deadline.
Trait Implementations§
Source§impl Clone for RevocationOutcome
impl Clone for RevocationOutcome
Source§fn clone(&self) -> RevocationOutcome
fn clone(&self) -> RevocationOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RevocationOutcome
Source§impl Debug for RevocationOutcome
impl Debug for RevocationOutcome
impl Eq for RevocationOutcome
Source§impl PartialEq for RevocationOutcome
impl PartialEq for RevocationOutcome
impl StructuralPartialEq for RevocationOutcome
Auto Trait Implementations§
impl Freeze for RevocationOutcome
impl RefUnwindSafe for RevocationOutcome
impl Send for RevocationOutcome
impl Sync for RevocationOutcome
impl Unpin for RevocationOutcome
impl UnsafeUnpin for RevocationOutcome
impl UnwindSafe for RevocationOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.