#[non_exhaustive]pub enum RevocationOutcome {
Requested,
Drained,
Forced,
Cancelled,
}Expand description
Outcome of one split revocation (the outcome label on
spate_coordination_revocations_total). A revocation is 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.
Requested is the denominator, and every revocation that leaves it
terminates in exactly one of Drained, Forced, or Cancelled. That
includes 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. The counter answers how much the leader is still
trying to move; the gauge answers 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 gaining side counts
AcquireReason::Reassigned. A split that completes mid-drain
counts here too; its tail is committed and nothing replays, even
though no worker 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. The leader’s revocation is a
decision rather than 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 by naming 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 slower than drain_deadline finishes cleanly instead of being
charged a replay for a move no worker is waiting on. That is the whole
of what cancelling buys; a drain that finishes inside the deadline
would not have been forced.
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, at the cost of one lane teardown and re-open. It counts 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 stays, still being read.
A cancelled drain is still bounded, by silence rather than by the
deadline. If it commits nothing for drain_deadline the split is
released anyway and re-claimed with a fresh lane; a drain that never
finishes would otherwise leave it owned, leased, and unread. 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.