#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "4")]
pub not_found: bool,
#[prost(message, optional, tag = "6")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub limit: u32,
#[prost(uint64, tag = "4")]
pub version: u64,
#[prost(bool, tag = "5")]
pub key_only: bool,
#[prost(bool, tag = "6")]
pub reverse: bool,
#[prost(bytes = "vec", tag = "7")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "8")]
pub sample_step: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub pairs: ::prost::alloc::vec::Vec<KvPair>,
#[prost(message, optional, tag = "3")]
pub error: ::core::option::Option<KeyError>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrewriteRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(message, repeated, tag = "2")]
pub mutations: ::prost::alloc::vec::Vec<Mutation>,
#[prost(bytes = "vec", tag = "3")]
pub primary_lock: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub start_version: u64,
#[prost(uint64, tag = "5")]
pub lock_ttl: u64,
#[prost(bool, tag = "6")]
pub skip_constraint_check: bool,
#[prost(enumeration = "prewrite_request::PessimisticAction", repeated, tag = "7")]
pub pessimistic_actions: ::prost::alloc::vec::Vec<i32>,
#[prost(uint64, tag = "8")]
pub txn_size: u64,
#[prost(uint64, tag = "9")]
pub for_update_ts: u64,
#[prost(uint64, tag = "10")]
pub min_commit_ts: u64,
#[prost(bool, tag = "11")]
pub use_async_commit: bool,
#[prost(bytes = "vec", repeated, tag = "12")]
pub secondaries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, tag = "13")]
pub try_one_pc: bool,
#[prost(uint64, tag = "14")]
pub max_commit_ts: u64,
#[prost(enumeration = "AssertionLevel", tag = "15")]
pub assertion_level: i32,
#[prost(message, repeated, tag = "16")]
pub for_update_ts_constraints: ::prost::alloc::vec::Vec<
prewrite_request::ForUpdateTsConstraint,
>,
#[prost(uint64, repeated, tag = "100")]
pub txn_file_chunks: ::prost::alloc::vec::Vec<u64>,
}
pub mod prewrite_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForUpdateTsConstraint {
#[prost(uint32, tag = "1")]
pub index: u32,
#[prost(uint64, tag = "2")]
pub expected_for_update_ts: u64,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PessimisticAction {
SkipPessimisticCheck = 0,
DoPessimisticCheck = 1,
DoConstraintCheck = 2,
}
impl PessimisticAction {
pub fn as_str_name(&self) -> &'static str {
match self {
PessimisticAction::SkipPessimisticCheck => "SKIP_PESSIMISTIC_CHECK",
PessimisticAction::DoPessimisticCheck => "DO_PESSIMISTIC_CHECK",
PessimisticAction::DoConstraintCheck => "DO_CONSTRAINT_CHECK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SKIP_PESSIMISTIC_CHECK" => Some(Self::SkipPessimisticCheck),
"DO_PESSIMISTIC_CHECK" => Some(Self::DoPessimisticCheck),
"DO_CONSTRAINT_CHECK" => Some(Self::DoConstraintCheck),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrewriteResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<KeyError>,
#[prost(uint64, tag = "3")]
pub min_commit_ts: u64,
#[prost(uint64, tag = "4")]
pub one_pc_commit_ts: u64,
#[prost(message, optional, tag = "5")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PessimisticLockRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(message, repeated, tag = "2")]
pub mutations: ::prost::alloc::vec::Vec<Mutation>,
#[prost(bytes = "vec", tag = "3")]
pub primary_lock: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub start_version: u64,
#[prost(uint64, tag = "5")]
pub lock_ttl: u64,
#[prost(uint64, tag = "6")]
pub for_update_ts: u64,
#[prost(bool, tag = "7")]
pub is_first_lock: bool,
#[prost(int64, tag = "8")]
pub wait_timeout: i64,
#[deprecated]
#[prost(bool, tag = "9")]
pub force: bool,
#[prost(bool, tag = "10")]
pub return_values: bool,
#[prost(uint64, tag = "11")]
pub min_commit_ts: u64,
#[prost(bool, tag = "12")]
pub check_existence: bool,
#[prost(bool, tag = "13")]
pub lock_only_if_exists: bool,
#[prost(enumeration = "PessimisticLockWakeUpMode", tag = "14")]
pub wake_up_mode: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PessimisticLockKeyResult {
#[prost(enumeration = "PessimisticLockKeyResultType", tag = "1")]
pub r#type: i32,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "3")]
pub existence: bool,
#[prost(uint64, tag = "4")]
pub locked_with_conflict_ts: u64,
#[prost(bool, tag = "11")]
pub skip_resolving_lock: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PessimisticLockResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<KeyError>,
#[deprecated]
#[prost(uint64, tag = "3")]
pub commit_ts: u64,
#[deprecated]
#[prost(bytes = "vec", tag = "4")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", repeated, tag = "5")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, repeated, tag = "6")]
pub not_founds: ::prost::alloc::vec::Vec<bool>,
#[prost(message, optional, tag = "7")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
#[prost(message, repeated, tag = "8")]
pub results: ::prost::alloc::vec::Vec<PessimisticLockKeyResult>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PessimisticRollbackRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub start_version: u64,
#[prost(uint64, tag = "3")]
pub for_update_ts: u64,
#[prost(bytes = "vec", repeated, tag = "4")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PessimisticRollbackResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<KeyError>,
#[prost(message, optional, tag = "3")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxnHeartBeatRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub primary_lock: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub start_version: u64,
#[prost(uint64, tag = "4")]
pub advise_lock_ttl: u64,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxnHeartBeatResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(uint64, tag = "3")]
pub lock_ttl: u64,
#[prost(message, optional, tag = "4")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckTxnStatusRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub primary_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub lock_ts: u64,
#[prost(uint64, tag = "4")]
pub caller_start_ts: u64,
#[prost(uint64, tag = "5")]
pub current_ts: u64,
#[prost(bool, tag = "6")]
pub rollback_if_not_exist: bool,
#[prost(bool, tag = "7")]
pub force_sync_commit: bool,
#[prost(bool, tag = "8")]
pub resolving_pessimistic_lock: bool,
#[prost(bool, tag = "9")]
pub verify_is_primary: bool,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckTxnStatusResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(uint64, tag = "3")]
pub lock_ttl: u64,
#[prost(uint64, tag = "4")]
pub commit_version: u64,
#[prost(enumeration = "Action", tag = "5")]
pub action: i32,
#[prost(message, optional, tag = "6")]
pub lock_info: ::core::option::Option<LockInfo>,
#[prost(message, optional, tag = "7")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckSecondaryLocksRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(uint64, tag = "3")]
pub start_version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckSecondaryLocksResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(message, repeated, tag = "3")]
pub locks: ::prost::alloc::vec::Vec<LockInfo>,
#[prost(uint64, tag = "4")]
pub commit_ts: u64,
#[prost(message, optional, tag = "5")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub start_version: u64,
#[prost(bytes = "vec", repeated, tag = "3")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(uint64, tag = "4")]
pub commit_version: u64,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(uint64, tag = "3")]
pub commit_version: u64,
#[prost(message, optional, tag = "4")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportRequest {
#[prost(message, repeated, tag = "1")]
pub mutations: ::prost::alloc::vec::Vec<Mutation>,
#[prost(uint64, tag = "2")]
pub commit_version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CleanupRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub start_version: u64,
#[prost(uint64, tag = "4")]
pub current_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CleanupResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(uint64, tag = "3")]
pub commit_version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(uint64, tag = "3")]
pub version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub pairs: ::prost::alloc::vec::Vec<KvPair>,
#[prost(message, optional, tag = "4")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
#[prost(message, optional, tag = "5")]
pub error: ::core::option::Option<KeyError>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchRollbackRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub start_version: u64,
#[prost(bytes = "vec", repeated, tag = "3")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchRollbackResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(message, optional, tag = "3")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanLockRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub max_version: u64,
#[prost(bytes = "vec", tag = "3")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "4")]
pub limit: u32,
#[prost(bytes = "vec", tag = "5")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanLockResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(message, repeated, tag = "3")]
pub locks: ::prost::alloc::vec::Vec<LockInfo>,
#[prost(message, optional, tag = "4")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveLockRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub start_version: u64,
#[prost(uint64, tag = "3")]
pub commit_version: u64,
#[prost(message, repeated, tag = "4")]
pub txn_infos: ::prost::alloc::vec::Vec<TxnInfo>,
#[prost(bytes = "vec", repeated, tag = "5")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveLockResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
#[prost(message, optional, tag = "3")]
pub exec_details_v2: ::core::option::Option<ExecDetailsV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub safe_point: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, optional, tag = "2")]
pub error: ::core::option::Option<KeyError>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRangeRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "4")]
pub notify_only: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRangeResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrepareFlashbackToVersionRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub start_ts: u64,
#[prost(uint64, tag = "5")]
pub version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrepareFlashbackToVersionResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlashbackToVersionRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub version: u64,
#[prost(bytes = "vec", tag = "3")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "5")]
pub start_ts: u64,
#[prost(uint64, tag = "6")]
pub commit_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlashbackToVersionResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawGetRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawGetResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "4")]
pub not_found: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchGetRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchGetResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub pairs: ::prost::alloc::vec::Vec<KvPair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawPutRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "4")]
pub cf: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub ttl: u64,
#[prost(bool, tag = "6")]
pub for_cas: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawPutResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchPutRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(message, repeated, tag = "2")]
pub pairs: ::prost::alloc::vec::Vec<KvPair>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
#[deprecated]
#[prost(uint64, tag = "4")]
pub ttl: u64,
#[prost(bool, tag = "5")]
pub for_cas: bool,
#[prost(uint64, repeated, tag = "6")]
pub ttls: ::prost::alloc::vec::Vec<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchPutResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawDeleteRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub for_cas: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawDeleteResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchDeleteRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub for_cas: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchDeleteResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawScanRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub limit: u32,
#[prost(bool, tag = "4")]
pub key_only: bool,
#[prost(string, tag = "5")]
pub cf: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub reverse: bool,
#[prost(bytes = "vec", tag = "7")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawScanResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub kvs: ::prost::alloc::vec::Vec<KvPair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawDeleteRangeRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "4")]
pub cf: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawDeleteRangeResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchScanRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(message, repeated, tag = "2")]
pub ranges: ::prost::alloc::vec::Vec<KeyRange>,
#[prost(uint32, tag = "3")]
pub each_limit: u32,
#[prost(bool, tag = "4")]
pub key_only: bool,
#[prost(string, tag = "5")]
pub cf: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub reverse: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawBatchScanResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(message, repeated, tag = "2")]
pub kvs: ::prost::alloc::vec::Vec<KvPair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsafeDestroyRangeRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsafeDestroyRangeResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterLockObserverRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub max_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterLockObserverResponse {
#[prost(string, tag = "1")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckLockObserverRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub max_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckLockObserverResponse {
#[prost(string, tag = "1")]
pub error: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub is_clean: bool,
#[prost(message, repeated, tag = "3")]
pub locks: ::prost::alloc::vec::Vec<LockInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveLockObserverRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub max_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveLockObserverResponse {
#[prost(string, tag = "1")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhysicalScanLockRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub max_ts: u64,
#[prost(bytes = "vec", tag = "3")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "4")]
pub limit: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PhysicalScanLockResponse {
#[prost(string, tag = "1")]
pub error: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub locks: ::prost::alloc::vec::Vec<LockInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitRegionRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[deprecated]
#[prost(bytes = "vec", tag = "2")]
pub split_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", repeated, tag = "3")]
pub split_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bool, tag = "4")]
pub is_raw_kv: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitRegionResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub left: ::core::option::Option<super::metapb::Region>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub right: ::core::option::Option<super::metapb::Region>,
#[prost(message, repeated, tag = "4")]
pub regions: ::prost::alloc::vec::Vec<super::metapb::Region>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadIndexRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub start_ts: u64,
#[prost(message, repeated, tag = "3")]
pub ranges: ::prost::alloc::vec::Vec<KeyRange>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadIndexResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(uint64, tag = "2")]
pub read_index: u64,
#[prost(message, optional, tag = "3")]
pub locked: ::core::option::Option<LockInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccGetByKeyRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccGetByKeyResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub info: ::core::option::Option<MvccInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccGetByStartTsRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(uint64, tag = "2")]
pub start_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccGetByStartTsResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub info: ::core::option::Option<MvccInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Context {
#[prost(uint64, tag = "1")]
pub region_id: u64,
#[prost(message, optional, tag = "2")]
pub region_epoch: ::core::option::Option<super::metapb::RegionEpoch>,
#[prost(message, optional, tag = "3")]
pub peer: ::core::option::Option<super::metapb::Peer>,
#[prost(uint64, tag = "5")]
pub term: u64,
#[prost(enumeration = "CommandPri", tag = "6")]
pub priority: i32,
#[prost(enumeration = "IsolationLevel", tag = "7")]
pub isolation_level: i32,
#[prost(bool, tag = "8")]
pub not_fill_cache: bool,
#[prost(bool, tag = "9")]
pub sync_log: bool,
#[prost(bool, tag = "10")]
pub record_time_stat: bool,
#[prost(bool, tag = "11")]
pub record_scan_stat: bool,
#[prost(bool, tag = "12")]
pub replica_read: bool,
#[prost(uint64, repeated, tag = "13")]
pub resolved_locks: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, tag = "14")]
pub max_execution_duration_ms: u64,
#[prost(uint64, tag = "15")]
pub applied_index: u64,
#[prost(uint64, tag = "16")]
pub task_id: u64,
#[prost(bool, tag = "17")]
pub stale_read: bool,
#[prost(bytes = "vec", tag = "18")]
pub resource_group_tag: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "DiskFullOpt", tag = "19")]
pub disk_full_opt: i32,
#[prost(bool, tag = "20")]
pub is_retry_request: bool,
#[prost(enumeration = "ApiVersion", tag = "21")]
pub api_version: i32,
#[prost(uint64, repeated, tag = "22")]
pub committed_locks: ::prost::alloc::vec::Vec<u64>,
#[prost(message, optional, tag = "23")]
pub trace_context: ::core::option::Option<super::tracepb::TraceContext>,
#[prost(string, tag = "24")]
pub request_source: ::prost::alloc::string::String,
#[prost(uint64, tag = "25")]
pub txn_source: u64,
#[prost(uint32, tag = "27")]
pub busy_threshold_ms: u32,
#[prost(message, optional, tag = "28")]
pub resource_control_context: ::core::option::Option<ResourceControlContext>,
#[prost(uint32, tag = "32")]
pub keyspace_id: u32,
#[prost(uint64, tag = "33")]
pub buckets_version: u64,
#[prost(message, optional, tag = "34")]
pub source_stmt: ::core::option::Option<SourceStmt>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceControlContext {
#[prost(string, tag = "1")]
pub resource_group_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub penalty: ::core::option::Option<super::resource_manager::Consumption>,
#[prost(uint64, tag = "3")]
pub override_priority: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceStmt {
#[prost(uint64, tag = "1")]
pub start_ts: u64,
#[prost(uint64, tag = "2")]
pub connection_id: u64,
#[prost(uint64, tag = "3")]
pub stmt_id: u64,
#[prost(string, tag = "4")]
pub session_alias: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LockInfo {
#[prost(bytes = "vec", tag = "1")]
pub primary_lock: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "2")]
pub lock_version: u64,
#[prost(bytes = "vec", tag = "3")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub lock_ttl: u64,
#[prost(uint64, tag = "5")]
pub txn_size: u64,
#[prost(enumeration = "Op", tag = "6")]
pub lock_type: i32,
#[prost(uint64, tag = "7")]
pub lock_for_update_ts: u64,
#[prost(bool, tag = "8")]
pub use_async_commit: bool,
#[prost(uint64, tag = "9")]
pub min_commit_ts: u64,
#[prost(bytes = "vec", repeated, tag = "10")]
pub secondaries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(uint64, tag = "11")]
pub duration_to_last_update_ms: u64,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyError {
#[prost(message, optional, tag = "1")]
pub locked: ::core::option::Option<LockInfo>,
#[prost(string, tag = "2")]
pub retryable: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub abort: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub conflict: ::core::option::Option<WriteConflict>,
#[prost(message, optional, tag = "5")]
pub already_exist: ::core::option::Option<AlreadyExist>,
#[prost(message, optional, tag = "6")]
pub deadlock: ::core::option::Option<Deadlock>,
#[prost(message, optional, tag = "7")]
pub commit_ts_expired: ::core::option::Option<CommitTsExpired>,
#[prost(message, optional, tag = "8")]
pub txn_not_found: ::core::option::Option<TxnNotFound>,
#[prost(message, optional, tag = "9")]
pub commit_ts_too_large: ::core::option::Option<CommitTsTooLarge>,
#[prost(message, optional, tag = "10")]
pub assertion_failed: ::core::option::Option<AssertionFailed>,
#[prost(message, optional, tag = "11")]
pub primary_mismatch: ::core::option::Option<PrimaryMismatch>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteConflict {
#[prost(uint64, tag = "1")]
pub start_ts: u64,
#[prost(uint64, tag = "2")]
pub conflict_ts: u64,
#[prost(bytes = "vec", tag = "3")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub primary: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "5")]
pub conflict_commit_ts: u64,
#[prost(enumeration = "write_conflict::Reason", tag = "6")]
pub reason: i32,
}
pub mod write_conflict {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Reason {
Unknown = 0,
Optimistic = 1,
PessimisticRetry = 2,
SelfRolledBack = 3,
RcCheckTs = 4,
LazyUniquenessCheck = 5,
}
impl Reason {
pub fn as_str_name(&self) -> &'static str {
match self {
Reason::Unknown => "Unknown",
Reason::Optimistic => "Optimistic",
Reason::PessimisticRetry => "PessimisticRetry",
Reason::SelfRolledBack => "SelfRolledBack",
Reason::RcCheckTs => "RcCheckTs",
Reason::LazyUniquenessCheck => "LazyUniquenessCheck",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Unknown" => Some(Self::Unknown),
"Optimistic" => Some(Self::Optimistic),
"PessimisticRetry" => Some(Self::PessimisticRetry),
"SelfRolledBack" => Some(Self::SelfRolledBack),
"RcCheckTs" => Some(Self::RcCheckTs),
"LazyUniquenessCheck" => Some(Self::LazyUniquenessCheck),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlreadyExist {
#[prost(bytes = "vec", tag = "1")]
pub key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Deadlock {
#[prost(uint64, tag = "1")]
pub lock_ts: u64,
#[prost(bytes = "vec", tag = "2")]
pub lock_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub deadlock_key_hash: u64,
#[prost(message, repeated, tag = "4")]
pub wait_chain: ::prost::alloc::vec::Vec<super::deadlock::WaitForEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitTsExpired {
#[prost(uint64, tag = "1")]
pub start_ts: u64,
#[prost(uint64, tag = "2")]
pub attempted_commit_ts: u64,
#[prost(bytes = "vec", tag = "3")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub min_commit_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxnNotFound {
#[prost(uint64, tag = "1")]
pub start_ts: u64,
#[prost(bytes = "vec", tag = "2")]
pub primary_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitTsTooLarge {
#[prost(uint64, tag = "1")]
pub commit_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssertionFailed {
#[prost(uint64, tag = "1")]
pub start_ts: u64,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "Assertion", tag = "3")]
pub assertion: i32,
#[prost(uint64, tag = "4")]
pub existing_start_ts: u64,
#[prost(uint64, tag = "5")]
pub existing_commit_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrimaryMismatch {
#[prost(message, optional, tag = "1")]
pub lock_info: ::core::option::Option<LockInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeDetail {
#[prost(uint64, tag = "1")]
pub wait_wall_time_ms: u64,
#[prost(uint64, tag = "2")]
pub process_wall_time_ms: u64,
#[prost(uint64, tag = "3")]
pub kv_read_wall_time_ms: u64,
#[prost(uint64, tag = "4")]
pub total_rpc_wall_time_ns: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeDetailV2 {
#[prost(uint64, tag = "1")]
pub wait_wall_time_ns: u64,
#[prost(uint64, tag = "2")]
pub process_wall_time_ns: u64,
#[prost(uint64, tag = "3")]
pub process_suspend_wall_time_ns: u64,
#[prost(uint64, tag = "4")]
pub kv_read_wall_time_ns: u64,
#[prost(uint64, tag = "5")]
pub total_rpc_wall_time_ns: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanInfo {
#[prost(int64, tag = "1")]
pub total: i64,
#[prost(int64, tag = "2")]
pub processed: i64,
#[prost(int64, tag = "3")]
pub read_bytes: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanDetail {
#[prost(message, optional, tag = "1")]
pub write: ::core::option::Option<ScanInfo>,
#[prost(message, optional, tag = "2")]
pub lock: ::core::option::Option<ScanInfo>,
#[prost(message, optional, tag = "3")]
pub data: ::core::option::Option<ScanInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanDetailV2 {
#[prost(uint64, tag = "1")]
pub processed_versions: u64,
#[prost(uint64, tag = "8")]
pub processed_versions_size: u64,
#[prost(uint64, tag = "2")]
pub total_versions: u64,
#[prost(uint64, tag = "3")]
pub rocksdb_delete_skipped_count: u64,
#[prost(uint64, tag = "4")]
pub rocksdb_key_skipped_count: u64,
#[prost(uint64, tag = "5")]
pub rocksdb_block_cache_hit_count: u64,
#[prost(uint64, tag = "6")]
pub rocksdb_block_read_count: u64,
#[prost(uint64, tag = "7")]
pub rocksdb_block_read_byte: u64,
#[prost(uint64, tag = "9")]
pub rocksdb_block_read_nanos: u64,
#[prost(uint64, tag = "10")]
pub get_snapshot_nanos: u64,
#[prost(uint64, tag = "11")]
pub read_index_propose_wait_nanos: u64,
#[prost(uint64, tag = "12")]
pub read_index_confirm_wait_nanos: u64,
#[prost(uint64, tag = "13")]
pub read_pool_schedule_wait_nanos: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecDetails {
#[prost(message, optional, tag = "1")]
pub time_detail: ::core::option::Option<TimeDetail>,
#[prost(message, optional, tag = "2")]
pub scan_detail: ::core::option::Option<ScanDetail>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecDetailsV2 {
#[prost(message, optional, tag = "1")]
pub time_detail: ::core::option::Option<TimeDetail>,
#[prost(message, optional, tag = "2")]
pub scan_detail_v2: ::core::option::Option<ScanDetailV2>,
#[prost(message, optional, tag = "3")]
pub write_detail: ::core::option::Option<WriteDetail>,
#[prost(message, optional, tag = "4")]
pub time_detail_v2: ::core::option::Option<TimeDetailV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteDetail {
#[prost(uint64, tag = "1")]
pub store_batch_wait_nanos: u64,
#[prost(uint64, tag = "2")]
pub propose_send_wait_nanos: u64,
#[prost(uint64, tag = "3")]
pub persist_log_nanos: u64,
#[prost(uint64, tag = "4")]
pub raft_db_write_leader_wait_nanos: u64,
#[prost(uint64, tag = "5")]
pub raft_db_sync_log_nanos: u64,
#[prost(uint64, tag = "6")]
pub raft_db_write_memtable_nanos: u64,
#[prost(uint64, tag = "7")]
pub commit_log_nanos: u64,
#[prost(uint64, tag = "8")]
pub apply_batch_wait_nanos: u64,
#[prost(uint64, tag = "9")]
pub apply_log_nanos: u64,
#[prost(uint64, tag = "10")]
pub apply_mutex_lock_nanos: u64,
#[prost(uint64, tag = "11")]
pub apply_write_leader_wait_nanos: u64,
#[prost(uint64, tag = "12")]
pub apply_write_wal_nanos: u64,
#[prost(uint64, tag = "13")]
pub apply_write_memtable_nanos: u64,
#[prost(uint64, tag = "14")]
pub latch_wait_nanos: u64,
#[prost(uint64, tag = "15")]
pub process_nanos: u64,
#[prost(uint64, tag = "16")]
pub throttle_nanos: u64,
#[prost(uint64, tag = "17")]
pub pessimistic_lock_wait_nanos: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KvPair {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<KeyError>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mutation {
#[prost(enumeration = "Op", tag = "1")]
pub op: i32,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "Assertion", tag = "4")]
pub assertion: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccWrite {
#[prost(enumeration = "Op", tag = "1")]
pub r#type: i32,
#[prost(uint64, tag = "2")]
pub start_ts: u64,
#[prost(uint64, tag = "3")]
pub commit_ts: u64,
#[prost(bytes = "vec", tag = "4")]
pub short_value: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "5")]
pub has_overlapped_rollback: bool,
#[prost(bool, tag = "6")]
pub has_gc_fence: bool,
#[prost(uint64, tag = "7")]
pub gc_fence: u64,
#[prost(uint64, tag = "8")]
pub last_change_ts: u64,
#[prost(uint64, tag = "9")]
pub versions_to_last_change: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccValue {
#[prost(uint64, tag = "1")]
pub start_ts: u64,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccLock {
#[prost(enumeration = "Op", tag = "1")]
pub r#type: i32,
#[prost(uint64, tag = "2")]
pub start_ts: u64,
#[prost(bytes = "vec", tag = "3")]
pub primary: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub short_value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "5")]
pub ttl: u64,
#[prost(uint64, tag = "6")]
pub for_update_ts: u64,
#[prost(uint64, tag = "7")]
pub txn_size: u64,
#[prost(bool, tag = "8")]
pub use_async_commit: bool,
#[prost(bytes = "vec", repeated, tag = "9")]
pub secondaries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(uint64, repeated, tag = "10")]
pub rollback_ts: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, tag = "11")]
pub last_change_ts: u64,
#[prost(uint64, tag = "12")]
pub versions_to_last_change: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MvccInfo {
#[prost(message, optional, tag = "1")]
pub lock: ::core::option::Option<MvccLock>,
#[prost(message, repeated, tag = "2")]
pub writes: ::prost::alloc::vec::Vec<MvccWrite>,
#[prost(message, repeated, tag = "3")]
pub values: ::prost::alloc::vec::Vec<MvccValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxnInfo {
#[prost(uint64, tag = "1")]
pub txn: u64,
#[prost(uint64, tag = "2")]
pub status: u64,
#[prost(bool, tag = "100")]
pub is_txn_file: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRange {
#[prost(bytes = "vec", tag = "1")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaderInfo {
#[prost(uint64, tag = "1")]
pub region_id: u64,
#[prost(uint64, tag = "2")]
pub peer_id: u64,
#[prost(uint64, tag = "3")]
pub term: u64,
#[prost(message, optional, tag = "4")]
pub region_epoch: ::core::option::Option<super::metapb::RegionEpoch>,
#[prost(message, optional, tag = "5")]
pub read_state: ::core::option::Option<ReadState>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadState {
#[prost(uint64, tag = "1")]
pub applied_index: u64,
#[prost(uint64, tag = "2")]
pub safe_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckLeaderRequest {
#[prost(message, repeated, tag = "1")]
pub regions: ::prost::alloc::vec::Vec<LeaderInfo>,
#[prost(uint64, tag = "2")]
pub ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckLeaderResponse {
#[prost(uint64, repeated, tag = "1")]
pub regions: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, tag = "2")]
pub ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreSafeTsRequest {
#[prost(message, optional, tag = "1")]
pub key_range: ::core::option::Option<KeyRange>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreSafeTsResponse {
#[prost(uint64, tag = "1")]
pub safe_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawGetKeyTtlRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawGetKeyTtlResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub ttl: u64,
#[prost(bool, tag = "4")]
pub not_found: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawCasRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(bytes = "vec", tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "4")]
pub previous_not_exist: bool,
#[prost(bytes = "vec", tag = "5")]
pub previous_value: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "6")]
pub cf: ::prost::alloc::string::String,
#[prost(uint64, tag = "7")]
pub ttl: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawCasResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub succeed: bool,
#[prost(bool, tag = "4")]
pub previous_not_exist: bool,
#[prost(bytes = "vec", tag = "5")]
pub previous_value: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLockWaitInfoRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLockWaitInfoResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub entries: ::prost::alloc::vec::Vec<super::deadlock::WaitForEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLockWaitHistoryRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLockWaitHistoryResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub entries: ::prost::alloc::vec::Vec<super::deadlock::WaitForEntry>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawCoprocessorRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(string, tag = "2")]
pub copr_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub copr_version_req: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub ranges: ::prost::alloc::vec::Vec<KeyRange>,
#[prost(bytes = "vec", tag = "5")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawCoprocessorResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawChecksumRequest {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Context>,
#[prost(enumeration = "ChecksumAlgorithm", tag = "2")]
pub algorithm: i32,
#[prost(message, repeated, tag = "3")]
pub ranges: ::prost::alloc::vec::Vec<KeyRange>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawChecksumResponse {
#[prost(message, optional, tag = "1")]
pub region_error: ::core::option::Option<super::errorpb::Error>,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub checksum: u64,
#[prost(uint64, tag = "4")]
pub total_kvs: u64,
#[prost(uint64, tag = "5")]
pub total_bytes: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactError {
#[prost(oneof = "compact_error::Error", tags = "1, 2, 3, 4")]
pub error: ::core::option::Option<compact_error::Error>,
}
pub mod compact_error {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Error {
#[prost(message, tag = "1")]
ErrInvalidStartKey(super::CompactErrorInvalidStartKey),
#[prost(message, tag = "2")]
ErrPhysicalTableNotExist(super::CompactErrorPhysicalTableNotExist),
#[prost(message, tag = "3")]
ErrCompactInProgress(super::CompactErrorCompactInProgress),
#[prost(message, tag = "4")]
ErrTooManyPendingTasks(super::CompactErrorTooManyPendingTasks),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactErrorInvalidStartKey {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactErrorPhysicalTableNotExist {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactErrorCompactInProgress {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactErrorTooManyPendingTasks {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactRequest {
#[prost(bytes = "vec", tag = "1")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "2")]
pub physical_table_id: i64,
#[prost(int64, tag = "3")]
pub logical_table_id: i64,
#[prost(enumeration = "ApiVersion", tag = "7")]
pub api_version: i32,
#[prost(uint32, tag = "8")]
pub keyspace_id: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<CompactError>,
#[prost(bool, tag = "2")]
pub has_remaining: bool,
#[prost(bytes = "vec", tag = "3")]
pub compacted_start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub compacted_end_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TiFlashSystemTableRequest {
#[prost(string, tag = "1")]
pub sql: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TiFlashSystemTableResponse {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PessimisticLockWakeUpMode {
WakeUpModeNormal = 0,
WakeUpModeForceLock = 1,
}
impl PessimisticLockWakeUpMode {
pub fn as_str_name(&self) -> &'static str {
match self {
PessimisticLockWakeUpMode::WakeUpModeNormal => "WakeUpModeNormal",
PessimisticLockWakeUpMode::WakeUpModeForceLock => "WakeUpModeForceLock",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WakeUpModeNormal" => Some(Self::WakeUpModeNormal),
"WakeUpModeForceLock" => Some(Self::WakeUpModeForceLock),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PessimisticLockKeyResultType {
LockResultNormal = 0,
LockResultLockedWithConflict = 1,
LockResultFailed = 2,
}
impl PessimisticLockKeyResultType {
pub fn as_str_name(&self) -> &'static str {
match self {
PessimisticLockKeyResultType::LockResultNormal => "LockResultNormal",
PessimisticLockKeyResultType::LockResultLockedWithConflict => {
"LockResultLockedWithConflict"
}
PessimisticLockKeyResultType::LockResultFailed => "LockResultFailed",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LockResultNormal" => Some(Self::LockResultNormal),
"LockResultLockedWithConflict" => Some(Self::LockResultLockedWithConflict),
"LockResultFailed" => Some(Self::LockResultFailed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ApiVersion {
V1 = 0,
V1ttl = 1,
V2 = 2,
}
impl ApiVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
ApiVersion::V1 => "V1",
ApiVersion::V1ttl => "V1TTL",
ApiVersion::V2 => "V2",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"V1" => Some(Self::V1),
"V1TTL" => Some(Self::V1ttl),
"V2" => Some(Self::V2),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CommandPri {
Normal = 0,
Low = 1,
High = 2,
}
impl CommandPri {
pub fn as_str_name(&self) -> &'static str {
match self {
CommandPri::Normal => "Normal",
CommandPri::Low => "Low",
CommandPri::High => "High",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Normal" => Some(Self::Normal),
"Low" => Some(Self::Low),
"High" => Some(Self::High),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IsolationLevel {
Si = 0,
Rc = 1,
RcCheckTs = 2,
}
impl IsolationLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
IsolationLevel::Si => "SI",
IsolationLevel::Rc => "RC",
IsolationLevel::RcCheckTs => "RCCheckTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SI" => Some(Self::Si),
"RC" => Some(Self::Rc),
"RCCheckTS" => Some(Self::RcCheckTs),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DiskFullOpt {
NotAllowedOnFull = 0,
AllowedOnAlmostFull = 1,
AllowedOnAlreadyFull = 2,
}
impl DiskFullOpt {
pub fn as_str_name(&self) -> &'static str {
match self {
DiskFullOpt::NotAllowedOnFull => "NotAllowedOnFull",
DiskFullOpt::AllowedOnAlmostFull => "AllowedOnAlmostFull",
DiskFullOpt::AllowedOnAlreadyFull => "AllowedOnAlreadyFull",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NotAllowedOnFull" => Some(Self::NotAllowedOnFull),
"AllowedOnAlmostFull" => Some(Self::AllowedOnAlmostFull),
"AllowedOnAlreadyFull" => Some(Self::AllowedOnAlreadyFull),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Op {
Put = 0,
Del = 1,
Lock = 2,
Rollback = 3,
Insert = 4,
PessimisticLock = 5,
CheckNotExists = 6,
}
impl Op {
pub fn as_str_name(&self) -> &'static str {
match self {
Op::Put => "Put",
Op::Del => "Del",
Op::Lock => "Lock",
Op::Rollback => "Rollback",
Op::Insert => "Insert",
Op::PessimisticLock => "PessimisticLock",
Op::CheckNotExists => "CheckNotExists",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Put" => Some(Self::Put),
"Del" => Some(Self::Del),
"Lock" => Some(Self::Lock),
"Rollback" => Some(Self::Rollback),
"Insert" => Some(Self::Insert),
"PessimisticLock" => Some(Self::PessimisticLock),
"CheckNotExists" => Some(Self::CheckNotExists),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Assertion {
None = 0,
Exist = 1,
NotExist = 2,
}
impl Assertion {
pub fn as_str_name(&self) -> &'static str {
match self {
Assertion::None => "None",
Assertion::Exist => "Exist",
Assertion::NotExist => "NotExist",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"None" => Some(Self::None),
"Exist" => Some(Self::Exist),
"NotExist" => Some(Self::NotExist),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AssertionLevel {
Off = 0,
Fast = 1,
Strict = 2,
}
impl AssertionLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
AssertionLevel::Off => "Off",
AssertionLevel::Fast => "Fast",
AssertionLevel::Strict => "Strict",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Off" => Some(Self::Off),
"Fast" => Some(Self::Fast),
"Strict" => Some(Self::Strict),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Action {
NoAction = 0,
TtlExpireRollback = 1,
LockNotExistRollback = 2,
MinCommitTsPushed = 3,
TtlExpirePessimisticRollback = 4,
LockNotExistDoNothing = 5,
}
impl Action {
pub fn as_str_name(&self) -> &'static str {
match self {
Action::NoAction => "NoAction",
Action::TtlExpireRollback => "TTLExpireRollback",
Action::LockNotExistRollback => "LockNotExistRollback",
Action::MinCommitTsPushed => "MinCommitTSPushed",
Action::TtlExpirePessimisticRollback => "TTLExpirePessimisticRollback",
Action::LockNotExistDoNothing => "LockNotExistDoNothing",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NoAction" => Some(Self::NoAction),
"TTLExpireRollback" => Some(Self::TtlExpireRollback),
"LockNotExistRollback" => Some(Self::LockNotExistRollback),
"MinCommitTSPushed" => Some(Self::MinCommitTsPushed),
"TTLExpirePessimisticRollback" => Some(Self::TtlExpirePessimisticRollback),
"LockNotExistDoNothing" => Some(Self::LockNotExistDoNothing),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExtraOp {
Noop = 0,
ReadOldValue = 1,
}
impl ExtraOp {
pub fn as_str_name(&self) -> &'static str {
match self {
ExtraOp::Noop => "Noop",
ExtraOp::ReadOldValue => "ReadOldValue",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Noop" => Some(Self::Noop),
"ReadOldValue" => Some(Self::ReadOldValue),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChecksumAlgorithm {
Crc64Xor = 0,
}
impl ChecksumAlgorithm {
pub fn as_str_name(&self) -> &'static str {
match self {
ChecksumAlgorithm::Crc64Xor => "Crc64_Xor",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Crc64_Xor" => Some(Self::Crc64Xor),
_ => None,
}
}
}