pub enum LockWaitOutcome {
Done,
TransientError,
Dangling,
WaitTimeout,
AgeTimeout,
GiveUp,
Abandoned {
reason: NoCacheReason,
token: u64,
},
}Expand description
What happened to this reader’s cache-lock wait, and so what to do next.
Distinct from LockStatus, the lock’s shared state, which cannot carry a
payload. This is per-reader and never stored, which is what lets
Self::Abandoned carry its cause.
Variants§
Done
The writer populated the asset. Look it up again.
TransientError
The writer hit a transient error such as a network failure. Compete to be the new writer.
Dangling
The write lock was dropped without being unlocked. A bug, but the request recovers by competing to be the new writer.
WaitTimeout
This reader has spent too long waiting on cache locks.
AgeTimeout
The writer held the lock past its age. Compete for it rather than waiting, so a stuck writer cannot pin every reader to it.
GiveUp
The writer found no lock was needed, for instance because the asset turned out to be uncacheable. Every reader proceeds uncached.
Abandoned
This reader stopped waiting because the writer published a fill it cannot use. Local to this reader: the lock status is untouched and every other reader goes on coalescing behind the same writer.
Fields
reason: NoCacheReasonWhy, from the matched UnusableFill.
Implementations§
Source§impl LockWaitOutcome
impl LockWaitOutcome
Sourcepub fn lock_status(&self) -> LockStatus
pub fn lock_status(&self) -> LockStatus
The nearest shared-status label, for tracing and metrics only.
Self::Abandoned reports LockStatus::GiveUp because it shares that
handling, but is never stored as such.
Trait Implementations§
Source§impl Clone for LockWaitOutcome
impl Clone for LockWaitOutcome
Source§fn clone(&self) -> LockWaitOutcome
fn clone(&self) -> LockWaitOutcome
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 LockWaitOutcome
Source§impl Debug for LockWaitOutcome
impl Debug for LockWaitOutcome
impl Eq for LockWaitOutcome
Source§impl PartialEq for LockWaitOutcome
impl PartialEq for LockWaitOutcome
impl StructuralPartialEq for LockWaitOutcome
Auto Trait Implementations§
impl Freeze for LockWaitOutcome
impl RefUnwindSafe for LockWaitOutcome
impl Send for LockWaitOutcome
impl Sync for LockWaitOutcome
impl Unpin for LockWaitOutcome
impl UnsafeUnpin for LockWaitOutcome
impl UnwindSafe for LockWaitOutcome
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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.