Skip to main content

RevocationOutcome

Enum RevocationOutcome 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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 neither drained nor drain_duration_seconds, because by then it is not a revocation ending. splits_draining stays 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

Source§

fn clone(&self) -> RevocationOutcome

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RevocationOutcome

Source§

impl Debug for RevocationOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RevocationOutcome

Source§

impl PartialEq for RevocationOutcome

Source§

fn eq(&self, other: &RevocationOutcome) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RevocationOutcome

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more