#[non_exhaustive]pub enum RetryReason {
Show 17 variants
KvNotMyVbucket,
KvInvalidVbucketMap,
KvTemporaryFailure,
KvCollectionOutdated,
KvErrorMapRetryIndicated,
KvLocked,
KvSyncWriteInProgress,
KvSyncWriteRecommitInProgress,
ServiceNotAvailable,
SocketClosedWhileInFlight,
SocketNotAvailable,
QueryPreparedStatementFailure,
QueryIndexNotFound,
SearchTooManyRequests,
HttpSendRequestFailed,
HttpConnectFailed,
NotReady,
}Expand description
The reason an operation is being retried.
Each variant identifies a specific transient failure condition that triggered
a retry. The SDK passes this to RetryStrategy::retry_after so the strategy
can decide whether (and how long) to wait before retrying.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
KvNotMyVbucket
The server indicated the vBucket is not owned by this node.
KvInvalidVbucketMap
The vBucket map is invalid and must be refreshed.
KvTemporaryFailure
A temporary failure occurred on the KV engine.
KvCollectionOutdated
The collection ID is outdated and must be re-resolved.
KvErrorMapRetryIndicated
The server error map indicated the operation should be retried.
KvLocked
The document is locked by another operation.
KvSyncWriteInProgress
A sync-write (durable operation) is already in progress on this key.
KvSyncWriteRecommitInProgress
A sync-write recommit is in progress on this key.
ServiceNotAvailable
The required service is temporarily unavailable.
SocketClosedWhileInFlight
The connection was closed while the request was in flight.
SocketNotAvailable
No connection is currently available.
QueryPreparedStatementFailure
A prepared statement for the query was invalidated.
QueryIndexNotFound
The query index was not found (may still be building).
SearchTooManyRequests
The search service is rejecting requests due to rate limiting.
HttpSendRequestFailed
An HTTP request failed to send.
HttpConnectFailed
An HTTP connection failed to be established.
NotReady
The SDK is not yet ready to perform the operation.
Implementations§
Source§impl RetryReason
impl RetryReason
Sourcepub fn allows_non_idempotent_retry(&self) -> bool
pub fn allows_non_idempotent_retry(&self) -> bool
Returns true if this reason allows retrying non-idempotent operations.
Most retry reasons are safe for non-idempotent retries because the server never processed the original request.
Sourcepub fn always_retry(&self) -> bool
pub fn always_retry(&self) -> bool
Returns true if the SDK should always retry for this reason,
regardless of the retry strategy’s decision.
Trait Implementations§
Source§impl Clone for RetryReason
impl Clone for RetryReason
Source§fn clone(&self) -> RetryReason
fn clone(&self) -> RetryReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RetryReason
impl Debug for RetryReason
Source§impl Display for RetryReason
impl Display for RetryReason
Source§impl Hash for RetryReason
impl Hash for RetryReason
Source§impl PartialEq for RetryReason
impl PartialEq for RetryReason
impl Copy for RetryReason
impl Eq for RetryReason
impl StructuralPartialEq for RetryReason
Auto Trait Implementations§
impl Freeze for RetryReason
impl RefUnwindSafe for RetryReason
impl Send for RetryReason
impl Sync for RetryReason
impl Unpin for RetryReason
impl UnsafeUnpin for RetryReason
impl UnwindSafe for RetryReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.