Enum tikv_client::Error
source · pub enum Error {
Show 33 variants
Unimplemented,
DuplicateKeyInsertion,
ResolveLockError(Vec<LockInfo>),
InvalidTransactionType,
OperationAfterCommitError,
OnePcFailure,
NoPrimaryKey,
UnsupportedMode,
NoCurrentRegions,
EntryNotFoundInRegionCache,
Io(Error),
Channel(RecvError),
Grpc(Error),
GrpcAPI(Status),
Url(InvalidUri),
Canceled(Canceled),
RegionError(Box<Error>),
UndeterminedError(Box<Error>),
KeyError(Box<KeyError>),
ExtractedErrors(Vec<Error>),
MultipleKeyErrors(Vec<Error>),
ColumnFamilyError(String),
JoinError(JoinError),
RegionForKeyNotFound {
key: Vec<u8>,
},
RegionForRangeNotFound {
range: BoundRange,
},
RegionNotFoundInResponse {
region_id: u64,
},
LeaderNotFound {
region_id: u64,
},
MaxScanLimitExceeded {
limit: u32,
max_limit: u32,
},
InvalidSemver(Error),
KvError {
message: String,
},
InternalError {
message: String,
},
StringError(String),
PessimisticLockError {
inner: Box<Error>,
success_keys: Vec<Vec<u8>>,
},
}
Expand description
An error originating from the TiKV client or dependencies.
Variants§
Unimplemented
Feature is not implemented.
DuplicateKeyInsertion
Duplicate key insertion happens.
ResolveLockError(Vec<LockInfo>)
Failed to resolve a lock
InvalidTransactionType
Will raise this error when using a pessimistic txn only operation on an optimistic txn
OperationAfterCommitError
It’s not allowed to perform operations in a transaction after it has been committed or rolled back.
OnePcFailure
We tried to use 1pc for a transaction, but it didn’t work. Probably should have used 2pc.
NoPrimaryKey
An operation requires a primary key, but the transaction was empty.
UnsupportedMode
For raw client, operation is not supported in atomic/non-atomic mode.
NoCurrentRegions
EntryNotFoundInRegionCache
Io(Error)
Wraps a std::io::Error
.
Channel(RecvError)
Wraps a std::io::Error
.
Grpc(Error)
Wraps a grpcio::Error
.
GrpcAPI(Status)
Wraps a grpcio::Error
.
Url(InvalidUri)
Wraps a grpcio::Error
.
Canceled(Canceled)
Represents that a futures oneshot channel was cancelled.
RegionError(Box<Error>)
Errors caused by changes of region information
UndeterminedError(Box<Error>)
Whether the transaction is committed or not is undetermined
KeyError(Box<KeyError>)
Wraps crate::proto::kvrpcpb::KeyError
ExtractedErrors(Vec<Error>)
Multiple errors generated from the ExtractError plan.
MultipleKeyErrors(Vec<Error>)
Multiple key errors
ColumnFamilyError(String)
Invalid ColumnFamily
JoinError(JoinError)
Can’t join tokio tasks
RegionForKeyNotFound
No region is found for the given key.
RegionForRangeNotFound
Fields
range: BoundRange
RegionNotFoundInResponse
No region is found for the given id. note: distinguish it with the RegionNotFound error in errorpb.
LeaderNotFound
No leader is found for the given id.
MaxScanLimitExceeded
Scan limit exceeds the maximum
InvalidSemver(Error)
KvError
A string error returned by TiKV server
InternalError
StringError(String)
PessimisticLockError
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request