pub enum BatchError {
EmptyBatch,
InvalidCommitTimestamp {
read_ts: Timestamp,
commit_ts: Timestamp,
},
CommitTsTooOld {
key: Vec<u8>,
commit_ts: Timestamp,
latest_commit_ts: Timestamp,
},
NoReadGuards,
DuplicateKeyInBatch {
key: Vec<u8>,
},
KeyLocked {
key: Vec<u8>,
txn_id: TxnId,
},
GuardFailedNewerVersion {
key: Vec<u8>,
read_ts: Timestamp,
actual_commit_ts: Timestamp,
},
GuardFailedVersionMismatch {
key: Vec<u8>,
expected: Option<Timestamp>,
actual: Option<Timestamp>,
},
GuardFailedValueMismatch {
key: Vec<u8>,
},
Backend(String),
}Expand description
Error during a direct or guarded batch.
Variants§
EmptyBatch
The batch contained no write operations.
InvalidCommitTimestamp
The commit timestamp is less than or equal to a guard’s read timestamp.
Fields
CommitTsTooOld
The commit timestamp is older than the latest committed version for a key.
Fields
NoReadGuards
A guarded batch was submitted without any read guards.
DuplicateKeyInBatch
The batch contains multiple physical writes for the same key.
KeyLocked
A key in the batch is currently locked by an active intent.
GuardFailedNewerVersion
A read guard failed because a newer version exists after the read_ts.
Fields
GuardFailedVersionMismatch
A read guard failed because the actual version did not match the expected version.
Fields
GuardFailedValueMismatch
A read guard failed because the actual logical value did not match the expected value.
Backend(String)
An error returned by the backend storage.
Trait Implementations§
Source§impl Clone for BatchError
impl Clone for BatchError
Source§fn clone(&self) -> BatchError
fn clone(&self) -> BatchError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchError
impl Debug for BatchError
Source§impl Display for BatchError
impl Display for BatchError
impl Eq for BatchError
Source§impl Error for BatchError
impl Error for BatchError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for BatchError
impl PartialEq for BatchError
Source§fn eq(&self, other: &BatchError) -> bool
fn eq(&self, other: &BatchError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BatchError
Auto Trait Implementations§
impl Freeze for BatchError
impl RefUnwindSafe for BatchError
impl Send for BatchError
impl Sync for BatchError
impl Unpin for BatchError
impl UnsafeUnpin for BatchError
impl UnwindSafe for BatchError
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
Mutably borrows from an owned value. Read more