diff --git a/Cargo.toml b/Cargo.toml index ca1029f3..b3d05cda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ lazy_static = "1" log = "0.4" pin-project = "1" prometheus = { version = "0.13", default-features = false } -prost = "0.13" +prost = "0.14" rand = "0.8" regex = "1" semver = "1.0" @@ -46,7 +46,8 @@ serde_json = "1" take_mut = "0.2.2" thiserror = "1" tokio = { version = "1.21", features = ["sync", "rt-multi-thread", "macros"] } -tonic = { version = "0.12", features = ["tls", "gzip"] } +tonic = { version = "0.14", features = ["tls-ring", "gzip"] } +tonic-prost = "0.14" [dev-dependencies] clap = "2" diff --git a/proto-build/Cargo.toml b/proto-build/Cargo.toml index ca3fad6e..fb69f1d7 100644 --- a/proto-build/Cargo.toml +++ b/proto-build/Cargo.toml @@ -12,6 +12,6 @@ edition = "2021" [dependencies] glob = "0.3" -tonic-build = { version = "0.10", features = ["cleanup-markdown"] } -# Keep this compatible with rust-toolchain 1.84.1. +tonic-prost-build = { version = "0.14", features = ["cleanup-markdown"] } +# Keep this pinned for reproducible builds. tempfile = "=3.14.0" diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index 4c4d7acd..c1e148b5 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -1,17 +1,19 @@ // Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0. +use std::path::PathBuf; + fn main() { - tonic_build::configure() + let protos = glob::glob("proto/*.proto") + .unwrap() + .collect::, _>>() + .unwrap(); + let includes = [PathBuf::from("proto/include"), PathBuf::from("proto")]; + + tonic_prost_build::configure() .emit_rerun_if_changed(false) .build_server(false) .include_file("mod.rs") .out_dir("src/generated") - .compile( - &glob::glob("proto/*.proto") - .unwrap() - .collect::, _>>() - .unwrap(), - &["proto/include", "proto"], - ) + .compile_protos(&protos, &includes) .unwrap(); } diff --git a/src/generated/autoid.rs b/src/generated/autoid.rs index 503024ab..c148b6f4 100644 --- a/src/generated/autoid.rs +++ b/src/generated/autoid.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct AutoIdRequest { #[prost(int64, tag = "1")] pub db_id: i64, @@ -17,8 +16,7 @@ pub struct AutoIdRequest { #[prost(uint32, tag = "7")] pub keyspace_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AutoIdResponse { #[prost(int64, tag = "1")] pub min: i64, @@ -27,8 +25,7 @@ pub struct AutoIdResponse { #[prost(bytes = "vec", tag = "3")] pub errmsg: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RebaseRequest { #[prost(int64, tag = "1")] pub db_id: i64, @@ -41,15 +38,20 @@ pub struct RebaseRequest { #[prost(bool, tag = "5")] pub force: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RebaseResponse { #[prost(bytes = "vec", tag = "1")] pub errmsg: ::prost::alloc::vec::Vec, } /// Generated client implementations. pub mod auto_id_alloc_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -69,10 +71,10 @@ pub mod auto_id_alloc_client { } impl AutoIdAllocClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -90,14 +92,14 @@ pub mod auto_id_alloc_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { AutoIdAllocClient::new(InterceptedService::new(inner, interceptor)) } @@ -140,12 +142,11 @@ pub mod auto_id_alloc_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/autoid.AutoIDAlloc/AllocAutoID", ); @@ -162,12 +163,11 @@ pub mod auto_id_alloc_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/autoid.AutoIDAlloc/Rebase", ); diff --git a/src/generated/backup.rs b/src/generated/backup.rs index a283075f..44ec9a09 100644 --- a/src/generated/backup.rs +++ b/src/generated/backup.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. /// The message save the metadata of a backup. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackupMeta { /// ID and version of backuped cluster. @@ -86,7 +85,6 @@ pub struct BackupMeta { #[prost(uint64, tag = "25")] pub backup_size: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackupRange { #[prost(bytes = "vec", tag = "1")] @@ -96,8 +94,7 @@ pub struct BackupRange { #[prost(message, repeated, tag = "3")] pub files: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct File { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -126,7 +123,6 @@ pub struct File { pub cipher_iv: ::prost::alloc::vec::Vec, } /// MetaFile describes a multi-level index of data used in backup. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MetaFile { /// A set of files that contains a MetaFile. @@ -149,14 +145,12 @@ pub struct MetaFile { #[prost(bytes = "vec", repeated, tag = "5")] pub ddls: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PlacementPolicy { #[prost(bytes = "vec", tag = "1")] pub info: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Schema { #[prost(bytes = "vec", tag = "1")] pub db: ::prost::alloc::vec::Vec, @@ -175,15 +169,13 @@ pub struct Schema { #[prost(bytes = "vec", tag = "7")] pub stats: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IdMap { #[prost(int64, tag = "1")] pub upstream_id: i64, #[prost(int64, tag = "2")] pub downstream_id: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PitrTableMap { #[prost(string, tag = "1")] @@ -193,7 +185,6 @@ pub struct PitrTableMap { #[prost(message, repeated, tag = "3")] pub partitions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PitrDbMap { #[prost(string, tag = "1")] @@ -203,8 +194,7 @@ pub struct PitrDbMap { #[prost(message, repeated, tag = "3")] pub tables: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RawRange { #[prost(bytes = "vec", tag = "1")] pub start_key: ::prost::alloc::vec::Vec, @@ -213,15 +203,13 @@ pub struct RawRange { #[prost(string, tag = "3")] pub cf: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ClusterIdError { #[prost(uint64, tag = "1")] pub current: u64, #[prost(uint64, tag = "2")] pub request: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { #[prost(string, tag = "1")] @@ -231,7 +219,6 @@ pub struct Error { } /// Nested message and enum types in `Error`. pub mod error { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Detail { #[prost(message, tag = "3")] @@ -242,15 +229,13 @@ pub mod error { RegionError(super::super::errorpb::Error), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CipherInfo { #[prost(enumeration = "super::encryptionpb::EncryptionMethod", tag = "1")] pub cipher_type: i32, #[prost(bytes = "vec", tag = "2")] pub cipher_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackupRequest { #[prost(uint64, tag = "1")] @@ -314,7 +299,6 @@ pub struct BackupRequest { #[prost(message, optional, tag = "20")] pub context: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamBackupTaskInfo { /// The storage for backup, parsed by BR. @@ -337,7 +321,6 @@ pub struct StreamBackupTaskInfo { #[prost(enumeration = "CompressionType", tag = "6")] pub compression_type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StorageBackend { #[prost(oneof = "storage_backend::Backend", tags = "1, 2, 3, 4, 5, 6, 7")] @@ -345,7 +328,6 @@ pub struct StorageBackend { } /// Nested message and enum types in `StorageBackend`. pub mod storage_backend { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Backend { #[prost(message, tag = "1")] @@ -365,20 +347,17 @@ pub mod storage_backend { } } /// Noop storage backend saves files into void. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Noop {} /// Local storage backend saves files into local disk -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Local { #[prost(string, tag = "1")] pub path: ::prost::alloc::string::String, } /// S3 storage backend saves files into S3 compatible storages /// For non-aws providers, endpoint must be provided -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct S3 { #[prost(string, tag = "1")] pub endpoint: ::prost::alloc::string::String, @@ -417,8 +396,7 @@ pub struct S3 { pub profile: ::prost::alloc::string::String, } /// GCS storage backend saves files into google cloud storage. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Gcs { #[prost(string, tag = "1")] pub endpoint: ::prost::alloc::string::String, @@ -440,8 +418,7 @@ pub struct Gcs { pub credentials_blob: ::prost::alloc::string::String, } /// The encryption algorithm must be AES256. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AzureCustomerKey { /// A Base64-encoded AES-256 encryption key value. #[prost(string, tag = "1")] @@ -451,8 +428,7 @@ pub struct AzureCustomerKey { pub encryption_key_sha256: ::prost::alloc::string::String, } /// AzureBlobStorage storage backend saves files into azure blob storage. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AzureBlobStorage { #[prost(string, tag = "1")] pub endpoint: ::prost::alloc::string::String, @@ -507,8 +483,7 @@ pub struct AzureBlobStorage { #[prost(message, optional, tag = "10")] pub encryption_key: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Bucket { #[prost(string, tag = "1")] pub endpoint: ::prost::alloc::string::String, @@ -522,7 +497,6 @@ pub struct Bucket { pub storage_class: ::prost::alloc::string::String, } /// CloudDynamic allows testing new cloud providers and new fields without changing protobuf definitions -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CloudDynamic { #[prost(message, optional, tag = "1")] @@ -537,14 +511,12 @@ pub struct CloudDynamic { >, } /// HDFS storage backend saves file into HDFS compatible storages -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Hdfs { /// a URL: hdfs:///some/path or hdfs://host:port/some/path #[prost(string, tag = "1")] pub remote: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BackupResponse { #[prost(message, optional, tag = "1")] @@ -559,15 +531,13 @@ pub struct BackupResponse { #[prost(enumeration = "super::kvrpcpb::ApiVersion", tag = "5")] pub api_version: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CleanupRequest { /// unique_id represents the unique handle of the whole backup predecure. /// it generated in prepare request and corrosponed to one specific backup. #[prost(string, tag = "1")] pub unique_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CleanupResponse { #[prost(message, optional, tag = "1")] @@ -575,14 +545,12 @@ pub struct CleanupResponse { #[prost(bool, tag = "2")] pub success: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrepareRequest { /// whether save state to the storage. #[prost(bool, tag = "1")] pub save_to_storage: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrepareResponse { #[prost(message, optional, tag = "1")] @@ -597,10 +565,8 @@ pub struct PrepareResponse { #[prost(uint64, tag = "4")] pub collect_file_size: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CheckAdminRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckAdminResponse { #[prost(message, optional, tag = "1")] @@ -610,7 +576,6 @@ pub struct CheckAdminResponse { #[prost(bool, tag = "3")] pub has_pending_admin: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExternalStorageRestoreRequest { #[prost(message, optional, tag = "1")] @@ -622,10 +587,8 @@ pub struct ExternalStorageRestoreRequest { #[prost(uint64, tag = "4")] pub content_length: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExternalStorageRestoreResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExternalStorageSaveRequest { #[prost(message, optional, tag = "1")] @@ -635,10 +598,8 @@ pub struct ExternalStorageSaveRequest { #[prost(uint64, tag = "3")] pub content_length: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExternalStorageSaveResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { /// deprecated after(in) v6.3.0 TiKV cluster @@ -658,7 +619,6 @@ pub struct Metadata { pub meta_version: i32, } /// DataFileGroup is the merged file info in log-backup -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataFileGroup { /// Path of the file. @@ -681,8 +641,7 @@ pub struct DataFileGroup { #[prost(uint64, tag = "6")] pub length: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DataFileInfo { /// SHA256 of the file. #[prost(bytes = "vec", tag = "1")] @@ -739,8 +698,7 @@ pub struct DataFileInfo { #[prost(enumeration = "CompressionType", tag = "18")] pub compression_type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StreamBackupError { /// the unix epoch time (in millisecs) of the time the error reported. #[prost(uint64, tag = "1")] @@ -772,10 +730,10 @@ impl CompressionType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CompressionType::Unknown => "UNKNOWN", - CompressionType::Lz4 => "LZ4", - CompressionType::Snappy => "SNAPPY", - CompressionType::Zstd => "ZSTD", + Self::Unknown => "UNKNOWN", + Self::Lz4 => "LZ4", + Self::Snappy => "SNAPPY", + Self::Zstd => "ZSTD", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -810,8 +768,8 @@ impl BackupMode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - BackupMode::Scan => "SCAN", - BackupMode::File => "FILE", + Self::Scan => "SCAN", + Self::File => "FILE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -836,8 +794,8 @@ impl MetaVersion { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - MetaVersion::V1 => "V1", - MetaVersion::V2 => "V2", + Self::V1 => "V1", + Self::V2 => "V2", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -862,8 +820,8 @@ impl FileType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - FileType::Delete => "Delete", - FileType::Put => "Put", + Self::Delete => "Delete", + Self::Put => "Put", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -877,7 +835,13 @@ impl FileType { } /// Generated client implementations. pub mod backup_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -897,10 +861,10 @@ pub mod backup_client { } impl BackupClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -918,14 +882,14 @@ pub mod backup_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { BackupClient::new(InterceptedService::new(inner, interceptor)) } @@ -971,12 +935,11 @@ pub mod backup_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/backup.Backup/backup"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("backup.Backup", "backup")); @@ -996,12 +959,11 @@ pub mod backup_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/backup.Backup/CheckPendingAdminOp", ); @@ -1023,12 +985,11 @@ pub mod backup_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/backup.Backup/prepare"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("backup.Backup", "prepare")); @@ -1047,12 +1008,11 @@ pub mod backup_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/backup.Backup/cleanup"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("backup.Backup", "cleanup")); @@ -1062,7 +1022,13 @@ pub mod backup_client { } /// Generated client implementations. pub mod external_storage_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// ExternalStorage is a service for using a cloud backend from StorageBackend to store files. @@ -1084,10 +1050,10 @@ pub mod external_storage_client { } impl ExternalStorageClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -1105,14 +1071,14 @@ pub mod external_storage_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ExternalStorageClient::new(InterceptedService::new(inner, interceptor)) } @@ -1159,12 +1125,11 @@ pub mod external_storage_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/backup.ExternalStorage/restore", ); @@ -1185,12 +1150,11 @@ pub mod external_storage_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/backup.ExternalStorage/save", ); diff --git a/src/generated/cdcpb.rs b/src/generated/cdcpb.rs index e80572e2..3f1190e5 100644 --- a/src/generated/cdcpb.rs +++ b/src/generated/cdcpb.rs @@ -1,28 +1,24 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Header { #[prost(uint64, tag = "1")] pub cluster_id: u64, #[prost(string, tag = "2")] pub ticdc_version: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct DuplicateRequest { #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Compatibility { #[prost(string, tag = "1")] pub required_version: ::prost::alloc::string::String, } /// ClusterIDMismatch is an error variable that /// tells people that the cluster ID of the request does not match the TiKV cluster ID. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ClusterIdMismatch { /// The current tikv cluster ID. #[prost(uint64, tag = "1")] @@ -31,7 +27,6 @@ pub struct ClusterIdMismatch { #[prost(uint64, tag = "2")] pub request: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { #[prost(message, optional, tag = "1")] @@ -49,16 +44,14 @@ pub struct Error { #[prost(message, optional, tag = "7")] pub server_is_busy: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TxnInfo { #[prost(uint64, tag = "1")] pub start_ts: u64, #[prost(bytes = "vec", tag = "2")] pub primary: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TxnStatus { #[prost(uint64, tag = "1")] pub start_ts: u64, @@ -69,7 +62,6 @@ pub struct TxnStatus { #[prost(bool, tag = "4")] pub is_rolled_back: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Event { #[prost(uint64, tag = "1")] @@ -83,8 +75,7 @@ pub struct Event { } /// Nested message and enum types in `Event`. pub mod event { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Row { #[prost(uint64, tag = "1")] pub start_ts: u64, @@ -135,9 +126,9 @@ pub mod event { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - OpType::Unknown => "UNKNOWN", - OpType::Put => "PUT", - OpType::Delete => "DELETE", + Self::Unknown => "UNKNOWN", + Self::Put => "PUT", + Self::Delete => "DELETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -151,13 +142,11 @@ pub mod event { } } } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Entries { #[prost(message, repeated, tag = "1")] pub entries: ::prost::alloc::vec::Vec, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Admin { #[prost(message, optional, tag = "1")] @@ -169,7 +158,6 @@ pub mod event { super::super::raft_cmdpb::AdminResponse, >, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LongTxn { #[prost(message, repeated, tag = "1")] @@ -202,12 +190,12 @@ pub mod event { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - LogType::Unknown => "UNKNOWN", - LogType::Prewrite => "PREWRITE", - LogType::Commit => "COMMIT", - LogType::Rollback => "ROLLBACK", - LogType::Committed => "COMMITTED", - LogType::Initialized => "INITIALIZED", + Self::Unknown => "UNKNOWN", + Self::Prewrite => "PREWRITE", + Self::Commit => "COMMIT", + Self::Rollback => "ROLLBACK", + Self::Committed => "COMMITTED", + Self::Initialized => "INITIALIZED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -223,7 +211,6 @@ pub mod event { } } } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Event { #[prost(message, tag = "3")] @@ -232,6 +219,7 @@ pub mod event { Admin(Admin), #[prost(message, tag = "5")] Error(super::Error), + #[deprecated] #[prost(uint64, tag = "6")] ResolvedTs(u64), /// Note that field 7 is taken by request_id. @@ -242,7 +230,6 @@ pub mod event { } } /// NOTE: events and resolved_ts won't appear simultaneously in one ChangeDataEvent. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangeDataEvent { #[prost(message, repeated, tag = "1")] @@ -251,8 +238,7 @@ pub struct ChangeDataEvent { #[prost(message, optional, tag = "2")] pub resolved_ts: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResolvedTs { #[prost(uint64, repeated, tag = "1")] pub regions: ::prost::alloc::vec::Vec, @@ -261,7 +247,6 @@ pub struct ResolvedTs { #[prost(uint64, tag = "3")] pub request_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangeDataRequest { #[prost(message, optional, tag = "1")] @@ -293,13 +278,10 @@ pub struct ChangeDataRequest { } /// Nested message and enum types in `ChangeDataRequest`. pub mod change_data_request { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Register {} - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Deregister {} - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NotifyTxnStatus { #[prost(message, repeated, tag = "1")] @@ -331,9 +313,9 @@ pub mod change_data_request { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - KvApi::TiDb => "TiDB", - KvApi::RawKv => "RawKV", - KvApi::TxnKv => "TxnKV", + Self::TiDb => "TiDB", + Self::RawKv => "RawKV", + Self::TxnKv => "TxnKV", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -346,7 +328,6 @@ pub mod change_data_request { } } } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Request { /// A normal request that trying to register change data feed on a region. @@ -362,7 +343,13 @@ pub mod change_data_request { } /// Generated client implementations. pub mod change_data_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -382,10 +369,10 @@ pub mod change_data_client { } impl ChangeDataClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -403,14 +390,14 @@ pub mod change_data_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ChangeDataClient::new(InterceptedService::new(inner, interceptor)) } @@ -456,12 +443,11 @@ pub mod change_data_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/cdcpb.ChangeData/EventFeed", ); @@ -486,12 +472,11 @@ pub mod change_data_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/cdcpb.ChangeData/EventFeedV2", ); diff --git a/src/generated/configpb.rs b/src/generated/configpb.rs index 58f3c345..1852ff10 100644 --- a/src/generated/configpb.rs +++ b/src/generated/configpb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Status { #[prost(enumeration = "StatusCode", tag = "1")] pub code: i32, @@ -13,36 +12,31 @@ pub struct Status { /// which can be shared, each kind of component only have one. /// For local version, every component will have one to represent /// the version of these configuration which cannot be shared. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Version { #[prost(uint64, tag = "1")] pub local: u64, #[prost(uint64, tag = "2")] pub global: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Local { #[prost(string, tag = "1")] pub component_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Global { #[prost(string, tag = "1")] pub component: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ConfigKind { #[prost(oneof = "config_kind::Kind", tags = "1, 2")] pub kind: ::core::option::Option, } /// Nested message and enum types in `ConfigKind`. pub mod config_kind { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Kind { #[prost(message, tag = "1")] Local(super::Local), @@ -50,16 +44,14 @@ pub mod config_kind { Global(super::Global), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ConfigEntry { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub value: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LocalConfig { #[prost(message, optional, tag = "1")] pub version: ::core::option::Option, @@ -70,14 +62,12 @@ pub struct LocalConfig { #[prost(string, tag = "4")] pub config: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Header { #[prost(uint64, tag = "1")] pub cluster_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -90,8 +80,7 @@ pub struct CreateRequest { #[prost(string, tag = "5")] pub config: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -102,13 +91,11 @@ pub struct CreateResponse { #[prost(string, tag = "4")] pub config: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetAllRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAllResponse { #[prost(message, optional, tag = "1")] @@ -118,8 +105,7 @@ pub struct GetAllResponse { #[prost(message, repeated, tag = "3")] pub local_configs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -130,8 +116,7 @@ pub struct GetRequest { #[prost(string, tag = "4")] pub component_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -142,7 +127,6 @@ pub struct GetResponse { #[prost(string, tag = "4")] pub config: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateRequest { #[prost(message, optional, tag = "1")] @@ -154,8 +138,7 @@ pub struct UpdateRequest { #[prost(message, repeated, tag = "4")] pub entries: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -166,8 +149,7 @@ pub struct UpdateResponse { #[prost(string, tag = "4")] pub config: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -176,8 +158,7 @@ pub struct DeleteRequest { #[prost(message, optional, tag = "3")] pub kind: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, @@ -203,12 +184,12 @@ impl StatusCode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StatusCode::Unknown => "UNKNOWN", - StatusCode::Ok => "OK", - StatusCode::WrongVersion => "WRONG_VERSION", - StatusCode::NotChange => "NOT_CHANGE", - StatusCode::ComponentNotFound => "COMPONENT_NOT_FOUND", - StatusCode::ComponentIdNotFound => "COMPONENT_ID_NOT_FOUND", + Self::Unknown => "UNKNOWN", + Self::Ok => "OK", + Self::WrongVersion => "WRONG_VERSION", + Self::NotChange => "NOT_CHANGE", + Self::ComponentNotFound => "COMPONENT_NOT_FOUND", + Self::ComponentIdNotFound => "COMPONENT_ID_NOT_FOUND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -226,7 +207,13 @@ impl StatusCode { } /// Generated client implementations. pub mod config_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -246,10 +233,10 @@ pub mod config_client { } impl ConfigClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -267,14 +254,14 @@ pub mod config_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ConfigClient::new(InterceptedService::new(inner, interceptor)) } @@ -317,12 +304,11 @@ pub mod config_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/configpb.Config/Create"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("configpb.Config", "Create")); @@ -336,12 +322,11 @@ pub mod config_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/configpb.Config/GetAll"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("configpb.Config", "GetAll")); @@ -355,12 +340,11 @@ pub mod config_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/configpb.Config/Get"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("configpb.Config", "Get")); @@ -374,12 +358,11 @@ pub mod config_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/configpb.Config/Update"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("configpb.Config", "Update")); @@ -393,12 +376,11 @@ pub mod config_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/configpb.Config/Delete"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("configpb.Config", "Delete")); diff --git a/src/generated/coprocessor.rs b/src/generated/coprocessor.rs index 907f9697..59835787 100644 --- a/src/generated/coprocessor.rs +++ b/src/generated/coprocessor.rs @@ -1,14 +1,12 @@ // This file is @generated by prost-build. /// \[start, end) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeyRange { #[prost(bytes = "vec", tag = "1")] pub start: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub end: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { #[prost(message, optional, tag = "1")] @@ -45,7 +43,6 @@ pub struct Request { #[prost(string, tag = "13")] pub connection_alias: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { #[prost(bytes = "vec", tag = "1")] @@ -80,7 +77,6 @@ pub struct Response { #[prost(message, repeated, tag = "13")] pub batch_responses: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionInfo { #[prost(uint64, tag = "1")] @@ -90,7 +86,6 @@ pub struct RegionInfo { #[prost(message, repeated, tag = "3")] pub ranges: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableRegions { #[prost(int64, tag = "1")] @@ -98,7 +93,6 @@ pub struct TableRegions { #[prost(message, repeated, tag = "2")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchRequest { #[prost(message, optional, tag = "1")] @@ -126,7 +120,6 @@ pub struct BatchRequest { #[prost(string, tag = "10")] pub connection_alias: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchResponse { #[prost(bytes = "vec", tag = "1")] @@ -138,7 +131,6 @@ pub struct BatchResponse { #[prost(message, repeated, tag = "4")] pub retry_regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreBatchTask { #[prost(uint64, tag = "1")] @@ -152,7 +144,6 @@ pub struct StoreBatchTask { #[prost(uint64, tag = "5")] pub task_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreBatchTaskResponse { #[prost(bytes = "vec", tag = "1")] diff --git a/src/generated/deadlock.rs b/src/generated/deadlock.rs index ef9c61e3..86027e8e 100644 --- a/src/generated/deadlock.rs +++ b/src/generated/deadlock.rs @@ -1,15 +1,12 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct WaitForEntriesRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WaitForEntriesResponse { #[prost(message, repeated, tag = "1")] pub entries: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WaitForEntry { /// The transaction id that is waiting. #[prost(uint64, tag = "1")] @@ -30,15 +27,13 @@ pub struct WaitForEntry { #[prost(uint64, tag = "6")] pub wait_time: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeadlockRequest { #[prost(enumeration = "DeadlockRequestType", tag = "1")] pub tp: i32, #[prost(message, optional, tag = "2")] pub entry: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeadlockResponse { /// The same entry sent by DeadlockRequest, identifies the sender. @@ -68,9 +63,9 @@ impl DeadlockRequestType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - DeadlockRequestType::Detect => "Detect", - DeadlockRequestType::CleanUpWaitFor => "CleanUpWaitFor", - DeadlockRequestType::CleanUp => "CleanUp", + Self::Detect => "Detect", + Self::CleanUpWaitFor => "CleanUpWaitFor", + Self::CleanUp => "CleanUp", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -85,7 +80,13 @@ impl DeadlockRequestType { } /// Generated client implementations. pub mod deadlock_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -105,10 +106,10 @@ pub mod deadlock_client { } impl DeadlockClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -126,14 +127,14 @@ pub mod deadlock_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { DeadlockClient::new(InterceptedService::new(inner, interceptor)) } @@ -181,12 +182,11 @@ pub mod deadlock_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/deadlock.Deadlock/GetWaitForEntries", ); @@ -209,12 +209,11 @@ pub mod deadlock_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/deadlock.Deadlock/Detect"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("deadlock.Deadlock", "Detect")); diff --git a/src/generated/debugpb.rs b/src/generated/debugpb.rs index dbe0d3e1..032d74a3 100644 --- a/src/generated/debugpb.rs +++ b/src/generated/debugpb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRequest { #[prost(enumeration = "Db", tag = "1")] pub db: i32, @@ -9,33 +8,28 @@ pub struct GetRequest { #[prost(bytes = "vec", tag = "3")] pub key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetResponse { #[prost(bytes = "vec", tag = "1")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftLogRequest { #[prost(uint64, tag = "1")] pub region_id: u64, #[prost(uint64, tag = "2")] pub log_index: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftLogResponse { #[prost(message, optional, tag = "1")] pub entry: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionInfoRequest { #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionInfoResponse { #[prost(message, optional, tag = "1")] @@ -47,15 +41,13 @@ pub struct RegionInfoResponse { super::raft_serverpb::RegionLocalState, >, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionSizeRequest { #[prost(uint64, tag = "1")] pub region_id: u64, #[prost(string, repeated, tag = "2")] pub cfs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionSizeResponse { #[prost(message, repeated, tag = "1")] @@ -63,8 +55,7 @@ pub struct RegionSizeResponse { } /// Nested message and enum types in `RegionSizeResponse`. pub mod region_size_response { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Entry { #[prost(string, tag = "1")] pub cf: ::prost::alloc::string::String, @@ -72,8 +63,7 @@ pub mod region_size_response { pub size: u64, } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScanMvccRequest { #[prost(bytes = "vec", tag = "1")] pub from_key: ::prost::alloc::vec::Vec, @@ -82,7 +72,6 @@ pub struct ScanMvccRequest { #[prost(uint64, tag = "3")] pub limit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanMvccResponse { #[prost(bytes = "vec", tag = "1")] @@ -90,8 +79,7 @@ pub struct ScanMvccResponse { #[prost(message, optional, tag = "2")] pub info: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactRequest { #[prost(enumeration = "Db", tag = "1")] pub db: i32, @@ -106,33 +94,26 @@ pub struct CompactRequest { #[prost(enumeration = "BottommostLevelCompaction", tag = "6")] pub bottommost_level_compaction: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct InjectFailPointRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub actions: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct InjectFailPointResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecoverFailPointRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecoverFailPointResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListFailPointsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListFailPointsResponse { #[prost(message, repeated, tag = "1")] @@ -140,8 +121,7 @@ pub struct ListFailPointsResponse { } /// Nested message and enum types in `ListFailPointsResponse`. pub mod list_fail_points_response { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Entry { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -149,14 +129,12 @@ pub mod list_fail_points_response { pub actions: ::prost::alloc::string::String, } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMetricsRequest { #[prost(bool, tag = "1")] pub all: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMetricsResponse { #[prost(string, tag = "1")] pub prometheus: ::prost::alloc::string::String, @@ -169,17 +147,14 @@ pub struct GetMetricsResponse { #[prost(uint64, tag = "5")] pub store_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionConsistencyCheckRequest { #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionConsistencyCheckResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ModifyTikvConfigRequest { #[prost(enumeration = "Module", tag = "1")] pub module: i32, @@ -188,76 +163,62 @@ pub struct ModifyTikvConfigRequest { #[prost(string, tag = "3")] pub config_value: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ModifyTikvConfigResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Property { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub value: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRegionPropertiesRequest { #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionPropertiesResponse { #[prost(message, repeated, tag = "1")] pub props: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetStoreInfoRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetStoreInfoResponse { #[prost(uint64, tag = "1")] pub store_id: u64, #[prost(enumeration = "super::kvrpcpb::ApiVersion", tag = "2")] pub api_version: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterInfoRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterInfoResponse { #[prost(uint64, tag = "1")] pub cluster_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetAllRegionsInStoreRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetAllRegionsInStoreResponse { #[prost(uint64, repeated, tag = "1")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResetToVersionRequest { #[prost(uint64, tag = "1")] pub ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResetToVersionResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRangePropertiesRequest { #[prost(bytes = "vec", tag = "1")] pub start_key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRangePropertiesResponse { #[prost(message, repeated, tag = "1")] @@ -267,8 +228,7 @@ pub struct GetRangePropertiesResponse { } /// Nested message and enum types in `GetRangePropertiesResponse`. pub mod get_range_properties_response { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RangeProperty { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, @@ -276,7 +236,6 @@ pub mod get_range_properties_response { pub value: ::prost::alloc::string::String, } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FlashbackToVersionRequest { #[prost(message, optional, tag = "1")] @@ -294,14 +253,12 @@ pub struct FlashbackToVersionRequest { #[prost(uint64, tag = "7")] pub commit_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FlashbackToVersionResponse { #[prost(string, tag = "1")] pub error: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRegionReadProgressRequest { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -312,8 +269,7 @@ pub struct GetRegionReadProgressRequest { #[prost(uint64, tag = "3")] pub min_start_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRegionReadProgressResponse { /// below are from region_read_progress module #[prost(uint64, tag = "1")] @@ -372,9 +328,9 @@ impl Db { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Db::Invalid => "INVALID", - Db::Kv => "KV", - Db::Raft => "RAFT", + Self::Invalid => "INVALID", + Self::Kv => "KV", + Self::Raft => "RAFT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -409,17 +365,17 @@ impl Module { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Module::Unused => "UNUSED", - Module::Kvdb => "KVDB", - Module::Raftdb => "RAFTDB", - Module::Readpool => "READPOOL", - Module::Server => "SERVER", - Module::Storage => "STORAGE", - Module::Pd => "PD", - Module::Metric => "METRIC", - Module::Coprocessor => "COPROCESSOR", - Module::Security => "SECURITY", - Module::Import => "IMPORT", + Self::Unused => "UNUSED", + Self::Kvdb => "KVDB", + Self::Raftdb => "RAFTDB", + Self::Readpool => "READPOOL", + Self::Server => "SERVER", + Self::Storage => "STORAGE", + Self::Pd => "PD", + Self::Metric => "METRIC", + Self::Coprocessor => "COPROCESSOR", + Self::Security => "SECURITY", + Self::Import => "IMPORT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -457,9 +413,9 @@ impl BottommostLevelCompaction { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - BottommostLevelCompaction::Skip => "Skip", - BottommostLevelCompaction::Force => "Force", - BottommostLevelCompaction::IfHaveCompactionFilter => "IfHaveCompactionFilter", + Self::Skip => "Skip", + Self::Force => "Force", + Self::IfHaveCompactionFilter => "IfHaveCompactionFilter", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -474,7 +430,13 @@ impl BottommostLevelCompaction { } /// Generated client implementations. pub mod debug_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// Debug service for TiKV. @@ -504,10 +466,10 @@ pub mod debug_client { } impl DebugClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -525,14 +487,14 @@ pub mod debug_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { DebugClient::new(InterceptedService::new(inner, interceptor)) } @@ -577,12 +539,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/Get"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "Get")); @@ -600,12 +561,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/RaftLog"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "RaftLog")); @@ -622,12 +582,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/RegionInfo"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "RegionInfo")); @@ -646,12 +605,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/RegionSize"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "RegionSize")); @@ -671,12 +629,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/ScanMvcc"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "ScanMvcc")); @@ -695,12 +652,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/Compact"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "Compact")); @@ -719,12 +675,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/InjectFailPoint", ); @@ -745,12 +700,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/RecoverFailPoint", ); @@ -771,12 +725,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/ListFailPoints", ); @@ -797,12 +750,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/debugpb.Debug/GetMetrics"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("debugpb.Debug", "GetMetrics")); @@ -820,12 +772,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/CheckRegionConsistency", ); @@ -846,12 +797,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/ModifyTikvConfig", ); @@ -872,12 +822,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/GetRegionProperties", ); @@ -898,12 +847,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/GetStoreInfo", ); @@ -924,12 +872,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/GetClusterInfo", ); @@ -950,12 +897,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/GetAllRegionsInStore", ); @@ -976,12 +922,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/ResetToVersion", ); @@ -1002,12 +947,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/GetRangeProperties", ); @@ -1028,12 +972,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/FlashbackToVersion", ); @@ -1054,12 +997,11 @@ pub mod debug_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/debugpb.Debug/GetRegionReadProgress", ); diff --git a/src/generated/diagnosticspb.rs b/src/generated/diagnosticspb.rs index edb1dd45..8ae09183 100644 --- a/src/generated/diagnosticspb.rs +++ b/src/generated/diagnosticspb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SearchLogRequest { #[prost(int64, tag = "1")] pub start_time: i64, @@ -41,8 +40,8 @@ pub mod search_log_request { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Target::Normal => "Normal", - Target::Slow => "Slow", + Self::Normal => "Normal", + Self::Slow => "Slow", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -55,14 +54,12 @@ pub mod search_log_request { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchLogResponse { #[prost(message, repeated, tag = "1")] pub messages: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LogMessage { #[prost(int64, tag = "1")] pub time: i64, @@ -71,21 +68,18 @@ pub struct LogMessage { #[prost(string, tag = "3")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ServerInfoRequest { #[prost(enumeration = "ServerInfoType", tag = "1")] pub tp: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ServerInfoPair { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub value: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerInfoItem { /// cpu, memory, disk, network ... @@ -106,7 +100,6 @@ pub struct ServerInfoItem { #[prost(message, repeated, tag = "3")] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerInfoResponse { #[prost(message, repeated, tag = "1")] @@ -130,13 +123,13 @@ impl LogLevel { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - LogLevel::Unknown => "UNKNOWN", - LogLevel::Debug => "Debug", - LogLevel::Info => "Info", - LogLevel::Warn => "Warn", - LogLevel::Trace => "Trace", - LogLevel::Critical => "Critical", - LogLevel::Error => "Error", + Self::Unknown => "UNKNOWN", + Self::Debug => "Debug", + Self::Info => "Info", + Self::Warn => "Warn", + Self::Trace => "Trace", + Self::Critical => "Critical", + Self::Error => "Error", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -168,10 +161,10 @@ impl ServerInfoType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ServerInfoType::All => "All", - ServerInfoType::HardwareInfo => "HardwareInfo", - ServerInfoType::SystemInfo => "SystemInfo", - ServerInfoType::LoadInfo => "LoadInfo", + Self::All => "All", + Self::HardwareInfo => "HardwareInfo", + Self::SystemInfo => "SystemInfo", + Self::LoadInfo => "LoadInfo", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -187,7 +180,13 @@ impl ServerInfoType { } /// Generated client implementations. pub mod diagnostics_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// Diagnostics service for TiDB cluster components. @@ -208,10 +207,10 @@ pub mod diagnostics_client { } impl DiagnosticsClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -229,14 +228,14 @@ pub mod diagnostics_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { DiagnosticsClient::new(InterceptedService::new(inner, interceptor)) } @@ -283,12 +282,11 @@ pub mod diagnostics_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/diagnosticspb.Diagnostics/search_log", ); @@ -309,12 +307,11 @@ pub mod diagnostics_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/diagnosticspb.Diagnostics/server_info", ); diff --git a/src/generated/disaggregated.rs b/src/generated/disaggregated.rs index 0b24ba7a..215f6fb4 100644 --- a/src/generated/disaggregated.rs +++ b/src/generated/disaggregated.rs @@ -1,14 +1,12 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct S3LockResult { #[prost(oneof = "s3_lock_result::Error", tags = "1, 2, 3")] pub error: ::core::option::Option, } /// Nested message and enum types in `S3LockResult`. pub mod s3_lock_result { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Error { #[prost(message, tag = "1")] Success(super::Success), @@ -18,24 +16,20 @@ pub mod s3_lock_result { Conflict(super::Conflict), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Success {} /// Error caused by S3GC owner changed /// client should retry -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct NotOwner {} /// Error caused by concurrency conflict, /// request cancel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Conflict { #[prost(string, tag = "1")] pub reason: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TryAddLockRequest { /// The data file key to add lock #[prost(bytes = "vec", tag = "1")] @@ -47,30 +41,25 @@ pub struct TryAddLockRequest { #[prost(uint64, tag = "4")] pub lock_seq: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TryAddLockResponse { #[prost(message, optional, tag = "1")] pub result: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TryMarkDeleteRequest { /// The data file key to be marked as deleted #[prost(bytes = "vec", tag = "1")] pub data_file_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TryMarkDeleteResponse { #[prost(message, optional, tag = "1")] pub result: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDisaggConfigRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DisaggS3Config { #[prost(string, tag = "1")] pub bucket: ::prost::alloc::string::String, @@ -79,14 +68,12 @@ pub struct DisaggS3Config { #[prost(string, tag = "3")] pub endpoint: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDisaggConfigResponse { #[prost(message, optional, tag = "1")] pub s3_config: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DisaggTaskMeta { /// start ts of a query #[prost(uint64, tag = "1")] @@ -124,15 +111,13 @@ pub struct DisaggTaskMeta { #[prost(string, tag = "11")] pub connection_alias: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DisaggReadError { #[prost(int32, tag = "1")] pub code: i32, #[prost(string, tag = "2")] pub msg: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EstablishDisaggTaskError { #[prost(oneof = "establish_disagg_task_error::Errors", tags = "1, 2, 99")] @@ -140,7 +125,6 @@ pub struct EstablishDisaggTaskError { } /// Nested message and enum types in `EstablishDisaggTaskError`. pub mod establish_disagg_task_error { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Errors { #[prost(message, tag = "1")] @@ -151,8 +135,7 @@ pub mod establish_disagg_task_error { ErrorOther(super::ErrorOther), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ErrorRegion { #[prost(string, tag = "1")] pub msg: ::prost::alloc::string::String, @@ -160,7 +143,6 @@ pub struct ErrorRegion { #[prost(uint64, repeated, tag = "2")] pub region_ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ErrorLocked { #[prost(string, tag = "1")] @@ -169,15 +151,13 @@ pub struct ErrorLocked { #[prost(message, repeated, tag = "2")] pub locked: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ErrorOther { #[prost(int32, tag = "1")] pub code: i32, #[prost(string, tag = "2")] pub msg: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EstablishDisaggTaskRequest { #[prost(message, optional, tag = "1")] @@ -202,7 +182,6 @@ pub struct EstablishDisaggTaskRequest { #[prost(bytes = "vec", tag = "7")] pub encoded_plan: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EstablishDisaggTaskResponse { #[prost(message, optional, tag = "1")] @@ -221,17 +200,14 @@ pub struct EstablishDisaggTaskResponse { #[prost(bytes = "vec", repeated, tag = "5")] pub tables: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CancelDisaggTaskRequest { #[prost(message, optional, tag = "1")] pub meta: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CancelDisaggTaskResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FetchDisaggPagesRequest { /// The snapshot id to fetch pages #[prost(message, optional, tag = "1")] @@ -245,8 +221,7 @@ pub struct FetchDisaggPagesRequest { #[prost(uint64, repeated, tag = "4")] pub page_ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PagesPacket { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, diff --git a/src/generated/disk_usage.rs b/src/generated/disk_usage.rs index 4b2c1fc5..f905514b 100644 --- a/src/generated/disk_usage.rs +++ b/src/generated/disk_usage.rs @@ -13,9 +13,9 @@ impl DiskUsage { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - DiskUsage::Normal => "Normal", - DiskUsage::AlmostFull => "AlmostFull", - DiskUsage::AlreadyFull => "AlreadyFull", + Self::Normal => "Normal", + Self::AlmostFull => "AlmostFull", + Self::AlreadyFull => "AlreadyFull", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/encryptionpb.rs b/src/generated/encryptionpb.rs index f7d7a924..854339cd 100644 --- a/src/generated/encryptionpb.rs +++ b/src/generated/encryptionpb.rs @@ -1,7 +1,6 @@ // This file is @generated by prost-build. /// General encryption metadata for any data type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct EncryptionMeta { /// ID of the key used to encrypt the data. #[prost(uint64, tag = "1")] @@ -11,8 +10,7 @@ pub struct EncryptionMeta { pub iv: ::prost::alloc::vec::Vec, } /// Information about an encrypted file. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FileInfo { /// ID of the key used to encrypt the file. #[prost(uint64, tag = "1")] @@ -24,7 +22,6 @@ pub struct FileInfo { #[prost(enumeration = "EncryptionMethod", tag = "3")] pub method: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileDictionary { /// A map of file name to file info. @@ -32,8 +29,7 @@ pub struct FileDictionary { pub files: ::std::collections::HashMap<::prost::alloc::string::String, FileInfo>, } /// The key used to encrypt the user data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DataKey { /// A sequence of secret bytes used to encrypt data. #[prost(bytes = "vec", tag = "1")] @@ -48,7 +44,6 @@ pub struct DataKey { #[prost(bool, tag = "4")] pub was_exposed: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyDictionary { /// A map of key ID to dat key. @@ -59,16 +54,14 @@ pub struct KeyDictionary { pub current_key_id: u64, } /// Master key config. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MasterKey { #[prost(oneof = "master_key::Backend", tags = "1, 2, 3")] pub backend: ::core::option::Option, } /// Nested message and enum types in `MasterKey`. pub mod master_key { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Backend { #[prost(message, tag = "1")] Plaintext(super::MasterKeyPlaintext), @@ -79,13 +72,11 @@ pub mod master_key { } } /// MasterKeyPlaintext indicates content is stored as plaintext. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct MasterKeyPlaintext {} /// MasterKeyFile is a master key backed by a file containing encryption key in human-readable /// hex format. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MasterKeyFile { /// Local file path. #[prost(string, tag = "1")] @@ -93,8 +84,7 @@ pub struct MasterKeyFile { } /// MasterKeyKms is a master key backed by KMS service that manages the encryption key, /// and provide API to encrypt and decrypt a data key, which is used to encrypt the content. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MasterKeyKms { /// KMS vendor. #[prost(string, tag = "1")] @@ -109,7 +99,6 @@ pub struct MasterKeyKms { #[prost(string, tag = "4")] pub endpoint: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncryptedContent { /// Metadata of the encrypted content. @@ -151,12 +140,12 @@ impl EncryptionMethod { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EncryptionMethod::Unknown => "UNKNOWN", - EncryptionMethod::Plaintext => "PLAINTEXT", - EncryptionMethod::Aes128Ctr => "AES128_CTR", - EncryptionMethod::Aes192Ctr => "AES192_CTR", - EncryptionMethod::Aes256Ctr => "AES256_CTR", - EncryptionMethod::Sm4Ctr => "SM4_CTR", + Self::Unknown => "UNKNOWN", + Self::Plaintext => "PLAINTEXT", + Self::Aes128Ctr => "AES128_CTR", + Self::Aes192Ctr => "AES192_CTR", + Self::Aes256Ctr => "AES256_CTR", + Self::Sm4Ctr => "SM4_CTR", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/enginepb.rs b/src/generated/enginepb.rs index b0841074..ca4d8374 100644 --- a/src/generated/enginepb.rs +++ b/src/generated/enginepb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommandRequestHeader { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -18,7 +17,6 @@ pub struct CommandRequestHeader { #[prost(bytes = "vec", tag = "6")] pub context: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandRequest { #[prost(message, optional, tag = "1")] @@ -33,14 +31,12 @@ pub struct CommandRequest { #[prost(message, optional, tag = "4")] pub admin_response: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandRequestBatch { #[prost(message, repeated, tag = "1")] pub requests: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommandResponseHeader { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -48,8 +44,7 @@ pub struct CommandResponseHeader { #[prost(bool, tag = "2")] pub destroyed: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommandResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -58,13 +53,11 @@ pub struct CommandResponse { #[prost(uint64, tag = "3")] pub applied_term: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommandResponseBatch { #[prost(message, repeated, tag = "1")] pub responses: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotState { #[prost(message, optional, tag = "1")] @@ -74,7 +67,6 @@ pub struct SnapshotState { #[prost(message, optional, tag = "3")] pub apply_state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotData { #[prost(string, tag = "1")] @@ -84,7 +76,6 @@ pub struct SnapshotData { #[prost(message, repeated, tag = "3")] pub data: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotRequest { #[prost(oneof = "snapshot_request::Chunk", tags = "1, 2")] @@ -92,7 +83,6 @@ pub struct SnapshotRequest { } /// Nested message and enum types in `SnapshotRequest`. pub mod snapshot_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Chunk { /// The first message for snapshots. @@ -104,12 +94,17 @@ pub mod snapshot_request { Data(super::SnapshotData), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SnapshotDone {} /// Generated client implementations. pub mod engine_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -129,10 +124,10 @@ pub mod engine_client { } impl EngineClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -150,14 +145,14 @@ pub mod engine_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { EngineClient::new(InterceptedService::new(inner, interceptor)) } @@ -205,12 +200,11 @@ pub mod engine_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/enginepb.Engine/ApplyCommandBatch", ); @@ -227,12 +221,11 @@ pub mod engine_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/enginepb.Engine/ApplySnapshot", ); diff --git a/src/generated/eraftpb.rs b/src/generated/eraftpb.rs index 6724cb25..3bea03e1 100644 --- a/src/generated/eraftpb.rs +++ b/src/generated/eraftpb.rs @@ -9,8 +9,7 @@ /// For configuration changes, the data will contain the ConfChange message and the /// context will provide anything needed to assist the configuration change. The context /// if for the user to set and use in this case. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Entry { #[prost(enumeration = "EntryType", tag = "1")] pub entry_type: i32, @@ -27,8 +26,7 @@ pub struct Entry { #[prost(bool, tag = "5")] pub sync_log: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SnapshotMetadata { /// The current `ConfState`. #[prost(message, optional, tag = "1")] @@ -40,15 +38,13 @@ pub struct SnapshotMetadata { #[prost(uint64, tag = "3")] pub term: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Snapshot { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub metadata: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Message { #[prost(enumeration = "MessageType", tag = "1")] @@ -87,8 +83,7 @@ pub struct Message { #[prost(int64, tag = "15")] pub priority: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct HardState { #[prost(uint64, tag = "1")] pub term: u64, @@ -97,8 +92,7 @@ pub struct HardState { #[prost(uint64, tag = "3")] pub commit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ConfState { #[prost(uint64, repeated, tag = "1")] pub voters: ::prost::alloc::vec::Vec, @@ -117,8 +111,7 @@ pub struct ConfState { #[prost(bool, tag = "5")] pub auto_leave: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ConfChange { #[prost(enumeration = "ConfChangeType", tag = "2")] pub change_type: i32, @@ -131,8 +124,7 @@ pub struct ConfChange { } /// ConfChangeSingle is an individual configuration change operation. Multiple /// such operations can be carried out atomically via a ConfChangeV2. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ConfChangeSingle { #[prost(enumeration = "ConfChangeType", tag = "1")] pub change_type: i32, @@ -171,7 +163,6 @@ pub struct ConfChangeSingle { /// For details on Raft membership changes, see: /// /// \[1\]: -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfChangeV2 { #[prost(enumeration = "ConfChangeTransition", tag = "1")] @@ -195,9 +186,9 @@ impl EntryType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EntryType::EntryNormal => "EntryNormal", - EntryType::EntryConfChange => "EntryConfChange", - EntryType::EntryConfChangeV2 => "EntryConfChangeV2", + Self::EntryNormal => "EntryNormal", + Self::EntryConfChange => "EntryConfChange", + Self::EntryConfChangeV2 => "EntryConfChangeV2", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -240,25 +231,25 @@ impl MessageType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - MessageType::MsgHup => "MsgHup", - MessageType::MsgBeat => "MsgBeat", - MessageType::MsgPropose => "MsgPropose", - MessageType::MsgAppend => "MsgAppend", - MessageType::MsgAppendResponse => "MsgAppendResponse", - MessageType::MsgRequestVote => "MsgRequestVote", - MessageType::MsgRequestVoteResponse => "MsgRequestVoteResponse", - MessageType::MsgSnapshot => "MsgSnapshot", - MessageType::MsgHeartbeat => "MsgHeartbeat", - MessageType::MsgHeartbeatResponse => "MsgHeartbeatResponse", - MessageType::MsgUnreachable => "MsgUnreachable", - MessageType::MsgSnapStatus => "MsgSnapStatus", - MessageType::MsgCheckQuorum => "MsgCheckQuorum", - MessageType::MsgTransferLeader => "MsgTransferLeader", - MessageType::MsgTimeoutNow => "MsgTimeoutNow", - MessageType::MsgReadIndex => "MsgReadIndex", - MessageType::MsgReadIndexResp => "MsgReadIndexResp", - MessageType::MsgRequestPreVote => "MsgRequestPreVote", - MessageType::MsgRequestPreVoteResponse => "MsgRequestPreVoteResponse", + Self::MsgHup => "MsgHup", + Self::MsgBeat => "MsgBeat", + Self::MsgPropose => "MsgPropose", + Self::MsgAppend => "MsgAppend", + Self::MsgAppendResponse => "MsgAppendResponse", + Self::MsgRequestVote => "MsgRequestVote", + Self::MsgRequestVoteResponse => "MsgRequestVoteResponse", + Self::MsgSnapshot => "MsgSnapshot", + Self::MsgHeartbeat => "MsgHeartbeat", + Self::MsgHeartbeatResponse => "MsgHeartbeatResponse", + Self::MsgUnreachable => "MsgUnreachable", + Self::MsgSnapStatus => "MsgSnapStatus", + Self::MsgCheckQuorum => "MsgCheckQuorum", + Self::MsgTransferLeader => "MsgTransferLeader", + Self::MsgTimeoutNow => "MsgTimeoutNow", + Self::MsgReadIndex => "MsgReadIndex", + Self::MsgReadIndexResp => "MsgReadIndexResp", + Self::MsgRequestPreVote => "MsgRequestPreVote", + Self::MsgRequestPreVoteResponse => "MsgRequestPreVoteResponse", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -313,9 +304,9 @@ impl ConfChangeTransition { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ConfChangeTransition::Auto => "Auto", - ConfChangeTransition::Implicit => "Implicit", - ConfChangeTransition::Explicit => "Explicit", + Self::Auto => "Auto", + Self::Implicit => "Implicit", + Self::Explicit => "Explicit", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -342,9 +333,9 @@ impl ConfChangeType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ConfChangeType::AddNode => "AddNode", - ConfChangeType::RemoveNode => "RemoveNode", - ConfChangeType::AddLearnerNode => "AddLearnerNode", + Self::AddNode => "AddNode", + Self::RemoveNode => "RemoveNode", + Self::AddLearnerNode => "AddLearnerNode", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/errorpb.rs b/src/generated/errorpb.rs index 4ed789b0..c85b0bfb 100644 --- a/src/generated/errorpb.rs +++ b/src/generated/errorpb.rs @@ -1,8 +1,7 @@ // This file is @generated by prost-build. /// NotLeader is the error variant that tells a request be handle by raft leader /// is sent to raft follower or learner. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct NotLeader { /// The requested region ID #[prost(uint64, tag = "1")] @@ -13,8 +12,7 @@ pub struct NotLeader { } /// IsWitness is the error variant that tells a request be handle by witness /// which should be forbidden and retry. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsWitness { /// The requested region ID #[prost(uint64, tag = "1")] @@ -22,16 +20,14 @@ pub struct IsWitness { } /// BucketVersionNotMatch is the error variant that tells the request buckets version is not match. /// client should update the buckets version and retry. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BucketVersionNotMatch { #[prost(uint64, tag = "1")] pub version: u64, #[prost(bytes = "vec", repeated, tag = "2")] pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DiskFull { /// The requested store ID #[prost(uint64, repeated, tag = "1")] @@ -42,8 +38,7 @@ pub struct DiskFull { } /// StoreNotMatch is the error variant that tells the request is sent to wrong store. /// (i.e. inconsistency of the store ID that request shows and the real store ID of this server.) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreNotMatch { /// Store id in request #[prost(uint64, tag = "1")] @@ -54,8 +49,7 @@ pub struct StoreNotMatch { } /// RegionNotFound is the error variant that tells there isn't any region in this TiKV /// matches the requested region ID. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionNotFound { /// The requested region ID #[prost(uint64, tag = "1")] @@ -63,8 +57,7 @@ pub struct RegionNotFound { } /// RegionNotInitialized is the error variant that tells there isn't any initialized peer /// matchesthe request region ID. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionNotInitialized { /// The request region ID #[prost(uint64, tag = "1")] @@ -72,8 +65,7 @@ pub struct RegionNotInitialized { } /// KeyNotInRegion is the error variant that tells the key the request requires isn't present in /// this region. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeyNotInRegion { /// The requested key #[prost(bytes = "vec", tag = "1")] @@ -91,7 +83,6 @@ pub struct KeyNotInRegion { /// EpochNotMatch is the error variant that tells a region has been updated. /// (e.g. by splitting / merging, or raft Confchange.) /// Hence, a command is based on a stale version of a region. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EpochNotMatch { /// Available regions that may be siblings of the requested one. @@ -99,8 +90,7 @@ pub struct EpochNotMatch { pub current_regions: ::prost::alloc::vec::Vec, } /// ServerIsBusy is the error variant that tells the server is too busy to response. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ServerIsBusy { #[prost(string, tag = "1")] pub reason: ::prost::alloc::string::String, @@ -116,14 +106,12 @@ pub struct ServerIsBusy { /// StaleCommand is the error variant that tells the command is stale, that is, /// the current request term is lower than current raft term. /// This can be retried at most time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StaleCommand {} /// RaftEntryTooLarge is the error variant that tells the request is too large to be serialized to a /// reasonable small raft entry. /// (i.e. greater than the configured value `raft_entry_max_size` in `raftstore`) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftEntryTooLarge { /// The requested region ID #[prost(uint64, tag = "1")] @@ -136,15 +124,13 @@ pub struct RaftEntryTooLarge { /// updating the max timestamp in the concurrency manager from PD TSO is ongoing. In this case, /// the prewrite of an async commit transaction cannot succeed. The client can backoff and /// resend the request. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct MaxTimestampNotSynced {} /// ReadIndexNotReady is the error variant that tells the read index request is not ready, that is, /// the current region is in a status that not ready to serve the read index request. For example, /// region is in splitting or merging status. /// This can be retried at most time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReadIndexNotReady { /// The reason why the region is not ready to serve read index request #[prost(string, tag = "1")] @@ -156,15 +142,13 @@ pub struct ReadIndexNotReady { /// ProposalInMergingMode is the error variant that tells the proposal is rejected because raft is /// in the merging mode. This may happen when BR/Lightning try to ingest SST. /// This can be retried at most time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ProposalInMergingMode { /// The requested region ID #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct DataIsNotReady { /// The requested region ID #[prost(uint64, tag = "1")] @@ -174,15 +158,13 @@ pub struct DataIsNotReady { #[prost(uint64, tag = "3")] pub safe_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecoveryInProgress { /// The requested region ID #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct FlashbackInProgress { /// The requested region ID #[prost(uint64, tag = "1")] @@ -190,8 +172,7 @@ pub struct FlashbackInProgress { #[prost(uint64, tag = "2")] pub flashback_start_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct FlashbackNotPrepared { /// The requested region ID #[prost(uint64, tag = "1")] @@ -199,8 +180,7 @@ pub struct FlashbackNotPrepared { } /// MismatchPeerId is the error variant that tells the request is sent to wrong peer. /// Client receives this error should reload the region info and retry. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct MismatchPeerId { #[prost(uint64, tag = "1")] pub request_peer_id: u64, @@ -208,7 +188,6 @@ pub struct MismatchPeerId { pub store_peer_id: u64, } /// Error wraps all region errors, indicates an error encountered by a request. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { /// The error message diff --git a/src/generated/gcpb.rs b/src/generated/gcpb.rs index ef87aeb3..6bd6fd55 100644 --- a/src/generated/gcpb.rs +++ b/src/generated/gcpb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RequestHeader { /// cluster_id is the ID of the cluster which be sent to. #[prost(uint64, tag = "1")] @@ -9,8 +8,7 @@ pub struct RequestHeader { #[prost(uint64, tag = "2")] pub sender_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResponseHeader { /// cluster_id is the ID of the cluster which sent the response. #[prost(uint64, tag = "1")] @@ -18,24 +16,21 @@ pub struct ResponseHeader { #[prost(message, optional, tag = "2")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(enumeration = "ErrorType", tag = "1")] pub r#type: i32, #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeySpace { #[prost(bytes = "vec", tag = "1")] pub space_id: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] pub gc_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListKeySpacesRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -43,7 +38,6 @@ pub struct ListKeySpacesRequest { #[prost(bool, tag = "2")] pub with_gc_safe_point: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListKeySpacesResponse { #[prost(message, optional, tag = "1")] @@ -51,16 +45,14 @@ pub struct ListKeySpacesResponse { #[prost(message, repeated, tag = "2")] pub key_spaces: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMinServiceSafePointRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] pub space_id: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMinServiceSafePointResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -71,8 +63,7 @@ pub struct GetMinServiceSafePointResponse { #[prost(int64, tag = "3")] pub revision: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcSafePointRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -85,8 +76,7 @@ pub struct UpdateGcSafePointRequest { #[prost(int64, tag = "4")] pub revision: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcSafePointResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -97,8 +87,7 @@ pub struct UpdateGcSafePointResponse { #[prost(uint64, tag = "3")] pub new_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateServiceSafePointRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -114,8 +103,7 @@ pub struct UpdateServiceSafePointRequest { #[prost(uint64, tag = "5")] pub safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateServiceSafePointResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -148,11 +136,11 @@ impl ErrorType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ErrorType::Ok => "OK", - ErrorType::Unknown => "UNKNOWN", - ErrorType::NotBootstrapped => "NOT_BOOTSTRAPPED", - ErrorType::RevisionMismatch => "REVISION_MISMATCH", - ErrorType::SafepointRollback => "SAFEPOINT_ROLLBACK", + Self::Ok => "OK", + Self::Unknown => "UNKNOWN", + Self::NotBootstrapped => "NOT_BOOTSTRAPPED", + Self::RevisionMismatch => "REVISION_MISMATCH", + Self::SafepointRollback => "SAFEPOINT_ROLLBACK", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -169,7 +157,13 @@ impl ErrorType { } /// Generated client implementations. pub mod gc_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -189,10 +183,10 @@ pub mod gc_client { } impl GcClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -210,14 +204,14 @@ pub mod gc_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { GcClient::new(InterceptedService::new(inner, interceptor)) } @@ -263,12 +257,11 @@ pub mod gc_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/gcpb.GC/ListKeySpaces"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("gcpb.GC", "ListKeySpaces")); @@ -285,12 +278,11 @@ pub mod gc_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/gcpb.GC/GetMinServiceSafePoint", ); @@ -310,12 +302,11 @@ pub mod gc_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/gcpb.GC/UpdateGCSafePoint", ); @@ -334,12 +325,11 @@ pub mod gc_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/gcpb.GC/UpdateServiceSafePoint", ); diff --git a/src/generated/google.api.rs b/src/generated/google.api.rs index bb9f7204..b7f234ce 100644 --- a/src/generated/google.api.rs +++ b/src/generated/google.api.rs @@ -2,7 +2,6 @@ /// Defines the HTTP configuration for an API service. It contains a list of /// \[HttpRule\]\[google.api.HttpRule\], each specifying the mapping of an RPC method /// to one or more HTTP REST API methods. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Http { /// A list of HTTP configuration rules that apply to individual API methods. @@ -301,7 +300,6 @@ pub struct Http { /// If an API needs to use a JSON array for request or response body, it can map /// the request or response body to a repeated field. However, some gRPC /// Transcoding implementations may not support this feature. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HttpRule { /// Selects a method to which this rule applies. @@ -341,8 +339,7 @@ pub mod http_rule { /// Determines the URL pattern is matched by this rules. This pattern can be /// used with any of the {get|put|post|delete|patch} methods. A custom method /// can be defined using the 'custom' field. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Pattern { /// Maps to HTTP GET. Used for listing and getting information about /// resources. @@ -369,8 +366,7 @@ pub mod http_rule { } } /// A custom pattern is used for defining custom HTTP verb. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CustomHttpPattern { /// The name of this custom HTTP verb. #[prost(string, tag = "1")] diff --git a/src/generated/import_kvpb.rs b/src/generated/import_kvpb.rs index 104b4346..90e651ce 100644 --- a/src/generated/import_kvpb.rs +++ b/src/generated/import_kvpb.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SwitchModeRequest { #[prost(string, tag = "1")] @@ -7,28 +6,23 @@ pub struct SwitchModeRequest { #[prost(message, optional, tag = "2")] pub request: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SwitchModeResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenEngineRequest { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub key_prefix: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct OpenEngineResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WriteHead { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Mutation { #[prost(enumeration = "mutation::Op", tag = "1")] pub op: i32, @@ -61,7 +55,7 @@ pub mod mutation { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Op::Put => "Put", + Self::Put => "Put", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -73,7 +67,6 @@ pub mod mutation { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteBatch { #[prost(uint64, tag = "1")] @@ -81,7 +74,6 @@ pub struct WriteBatch { #[prost(message, repeated, tag = "2")] pub mutations: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteEngineRequest { #[prost(oneof = "write_engine_request::Chunk", tags = "1, 2")] @@ -89,7 +81,6 @@ pub struct WriteEngineRequest { } /// Nested message and enum types in `WriteEngineRequest`. pub mod write_engine_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Chunk { #[prost(message, tag = "1")] @@ -98,15 +89,13 @@ pub mod write_engine_request { Batch(super::WriteBatch), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KvPair { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteEngineV3Request { #[prost(bytes = "vec", tag = "1")] @@ -116,45 +105,37 @@ pub struct WriteEngineV3Request { #[prost(message, repeated, tag = "3")] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WriteEngineResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CloseEngineRequest { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CloseEngineResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ImportEngineRequest { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, #[prost(string, tag = "2")] pub pd_addr: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ImportEngineResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CleanupEngineRequest { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CleanupEngineResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactClusterRequest { #[prost(string, tag = "1")] @@ -162,31 +143,25 @@ pub struct CompactClusterRequest { #[prost(message, optional, tag = "2")] pub request: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactClusterResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetVersionRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetVersionResponse { #[prost(string, tag = "1")] pub version: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub commit: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMetricsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMetricsResponse { #[prost(string, tag = "1")] pub prometheus: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { /// This can happen if the client hasn't opened the engine, or the server /// restarts while the client is writing or closing. An unclosed engine will @@ -197,8 +172,7 @@ pub struct Error { } /// Nested message and enum types in `Error`. pub mod error { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct EngineNotFound { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, @@ -206,7 +180,13 @@ pub mod error { } /// Generated client implementations. pub mod import_kv_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// ImportKV provides a service to import key-value pairs to TiKV. @@ -245,10 +225,10 @@ pub mod import_kv_client { } impl ImportKvClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -266,14 +246,14 @@ pub mod import_kv_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ImportKvClient::new(InterceptedService::new(inner, interceptor)) } @@ -320,12 +300,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/SwitchMode", ); @@ -346,12 +325,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/OpenEngine", ); @@ -374,12 +352,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/WriteEngine", ); @@ -400,12 +377,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/WriteEngineV3", ); @@ -426,12 +402,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/CloseEngine", ); @@ -452,12 +427,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/ImportEngine", ); @@ -478,12 +452,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/CleanupEngine", ); @@ -504,12 +477,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/CompactCluster", ); @@ -530,12 +502,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/GetVersion", ); @@ -556,12 +527,11 @@ pub mod import_kv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_kvpb.ImportKV/GetMetrics", ); diff --git a/src/generated/import_sstpb.rs b/src/generated/import_sstpb.rs index 4f8a1274..b2830b50 100644 --- a/src/generated/import_sstpb.rs +++ b/src/generated/import_sstpb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SuspendImportRpcRequest { /// whether to suspend new imports. #[prost(bool, tag = "1")] @@ -14,14 +13,12 @@ pub struct SuspendImportRpcRequest { #[prost(string, tag = "3")] pub caller: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SuspendImportRpcResponse { /// The last state before this RPC. #[prost(bool, tag = "1")] pub already_suspended: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SwitchModeRequest { #[prost(enumeration = "SwitchMode", tag = "1")] @@ -29,28 +26,23 @@ pub struct SwitchModeRequest { #[prost(message, repeated, tag = "2")] pub ranges: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SwitchModeResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetModeRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetModeResponse { #[prost(enumeration = "SwitchMode", tag = "1")] pub mode: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Range { #[prost(bytes = "vec", tag = "1")] pub start: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub end: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SstMeta { #[prost(bytes = "vec", tag = "1")] pub uuid: ::prost::alloc::vec::Vec, @@ -83,8 +75,7 @@ pub struct SstMeta { } /// A rewrite rule is applied on the *encoded* keys (the internal storage /// representation). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RewriteRule { #[prost(bytes = "vec", tag = "1")] pub old_key_prefix: ::prost::alloc::vec::Vec, @@ -93,16 +84,14 @@ pub struct RewriteRule { #[prost(uint64, tag = "3")] pub new_timestamp: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UploadRequest { #[prost(oneof = "upload_request::Chunk", tags = "1, 2")] pub chunk: ::core::option::Option, } /// Nested message and enum types in `UploadRequest`. pub mod upload_request { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Chunk { #[prost(message, tag = "1")] Meta(super::SstMeta), @@ -110,10 +99,8 @@ pub mod upload_request { Data(::prost::alloc::vec::Vec), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct UploadResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngestRequest { #[prost(message, optional, tag = "1")] @@ -121,7 +108,6 @@ pub struct IngestRequest { #[prost(message, optional, tag = "2")] pub sst: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MultiIngestRequest { #[prost(message, optional, tag = "1")] @@ -129,13 +115,11 @@ pub struct MultiIngestRequest { #[prost(message, repeated, tag = "2")] pub ssts: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngestResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompactRequest { /// Compact files in the range and above the output level. @@ -148,10 +132,8 @@ pub struct CompactRequest { #[prost(message, optional, tag = "3")] pub context: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DownloadRequest { /// Map represents the map of \. @@ -205,7 +187,6 @@ pub struct DownloadRequest { } /// For now it is just used for distinguishing the error of the request with the error /// of gRPC, add more concrete types if it is necessary later. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Error { #[prost(string, tag = "1")] @@ -214,7 +195,6 @@ pub struct Error { #[prost(message, optional, tag = "2")] pub store_error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DownloadResponse { /// The actual key range (after rewrite) of the downloaded SST. The range is @@ -240,18 +220,15 @@ pub struct DownloadResponse { #[prost(message, repeated, tag = "6")] pub ssts: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SetDownloadSpeedLimitRequest { /// The download speed limit (bytes/second). Set to 0 for unlimited speed. #[prost(uint64, tag = "1")] pub speed_limit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SetDownloadSpeedLimitResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Pair { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, @@ -285,8 +262,8 @@ pub mod pair { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Op::Put => "Put", - Op::Delete => "Delete", + Self::Put => "Put", + Self::Delete => "Delete", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -299,7 +276,6 @@ pub mod pair { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteBatch { #[prost(uint64, tag = "1")] @@ -307,7 +283,6 @@ pub struct WriteBatch { #[prost(message, repeated, tag = "2")] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteRequest { #[prost(message, optional, tag = "3")] @@ -317,7 +292,6 @@ pub struct WriteRequest { } /// Nested message and enum types in `WriteRequest`. pub mod write_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Chunk { #[prost(message, tag = "1")] @@ -326,7 +300,6 @@ pub mod write_request { Batch(super::WriteBatch), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteResponse { #[prost(message, optional, tag = "1")] @@ -334,7 +307,6 @@ pub struct WriteResponse { #[prost(message, repeated, tag = "2")] pub metas: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawWriteBatch { #[prost(uint64, tag = "1")] @@ -349,7 +321,6 @@ pub struct RawWriteBatch { #[prost(uint64, tag = "3")] pub ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawWriteRequest { #[prost(message, optional, tag = "3")] @@ -359,7 +330,6 @@ pub struct RawWriteRequest { } /// Nested message and enum types in `RawWriteRequest`. pub mod raw_write_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Chunk { #[prost(message, tag = "1")] @@ -368,7 +338,6 @@ pub mod raw_write_request { Batch(super::RawWriteBatch), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawWriteResponse { #[prost(message, optional, tag = "1")] @@ -376,7 +345,6 @@ pub struct RawWriteResponse { #[prost(message, repeated, tag = "2")] pub metas: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DuplicateDetectRequest { #[prost(message, optional, tag = "1")] @@ -392,8 +360,7 @@ pub struct DuplicateDetectRequest { #[prost(uint64, tag = "5")] pub min_commit_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KvPair { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, @@ -402,7 +369,6 @@ pub struct KvPair { #[prost(uint64, tag = "3")] pub commit_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DuplicateDetectResponse { #[prost(message, optional, tag = "1")] @@ -422,8 +388,7 @@ pub struct DuplicateDetectResponse { #[prost(message, repeated, tag = "3")] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KvMeta { /// The file name of the KV file. #[prost(string, tag = "1")] @@ -465,7 +430,6 @@ pub struct KvMeta { #[prost(enumeration = "super::backup::CompressionType", tag = "13")] pub compression_type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ApplyRequest { /// The meta of the KV file. @@ -502,7 +466,6 @@ pub struct ApplyRequest { #[prost(message, optional, tag = "11")] pub cipher_info: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ApplyResponse { /// The actual key range (after rewrite) of the downloaded file. The range is @@ -512,14 +475,12 @@ pub struct ApplyResponse { #[prost(message, optional, tag = "2")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ClearRequest { /// clear files in import directory with given prefix. #[prost(string, tag = "1")] pub prefix: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearResponse { #[prost(message, optional, tag = "1")] @@ -538,8 +499,8 @@ impl SwitchMode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - SwitchMode::Normal => "Normal", - SwitchMode::Import => "Import", + Self::Normal => "Normal", + Self::Import => "Import", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -566,8 +527,8 @@ impl DownloadRequestType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - DownloadRequestType::Legacy => "Legacy", - DownloadRequestType::Keyspace => "Keyspace", + Self::Legacy => "Legacy", + Self::Keyspace => "Keyspace", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -581,7 +542,13 @@ impl DownloadRequestType { } /// Generated client implementations. pub mod import_sst_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// ImportSST provides a service to import a generated SST file to a region in TiKV. @@ -617,10 +584,10 @@ pub mod import_sst_client { } impl ImportSstClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -638,14 +605,14 @@ pub mod import_sst_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ImportSstClient::new(InterceptedService::new(inner, interceptor)) } @@ -692,12 +659,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/SwitchMode", ); @@ -718,12 +684,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/GetMode", ); @@ -741,12 +706,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/Upload", ); @@ -764,12 +728,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/Ingest", ); @@ -790,12 +753,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/Compact", ); @@ -815,12 +777,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/SetDownloadSpeedLimit", ); @@ -844,12 +805,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/Download", ); @@ -867,12 +827,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/Write", ); @@ -892,12 +851,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/RawWrite", ); @@ -915,12 +873,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/MultiIngest", ); @@ -941,12 +898,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/DuplicateDetect", ); @@ -964,12 +920,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/Apply", ); @@ -987,12 +942,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/ClearFiles", ); @@ -1013,12 +967,11 @@ pub mod import_sst_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/import_sstpb.ImportSST/SuspendImportRPC", ); diff --git a/src/generated/keyspacepb.rs b/src/generated/keyspacepb.rs index 3cf798d9..2a82d6b4 100644 --- a/src/generated/keyspacepb.rs +++ b/src/generated/keyspacepb.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyspaceMeta { #[prost(uint32, tag = "1")] @@ -18,15 +17,13 @@ pub struct KeyspaceMeta { ::prost::alloc::string::String, >, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LoadKeyspaceRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(string, tag = "2")] pub name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LoadKeyspaceResponse { #[prost(message, optional, tag = "1")] @@ -34,13 +31,11 @@ pub struct LoadKeyspaceResponse { #[prost(message, optional, tag = "2")] pub keyspace: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct WatchKeyspacesRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WatchKeyspacesResponse { #[prost(message, optional, tag = "1")] @@ -48,8 +43,7 @@ pub struct WatchKeyspacesResponse { #[prost(message, repeated, tag = "2")] pub keyspaces: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateKeyspaceStateRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -58,7 +52,6 @@ pub struct UpdateKeyspaceStateRequest { #[prost(enumeration = "KeyspaceState", tag = "3")] pub state: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateKeyspaceStateResponse { #[prost(message, optional, tag = "1")] @@ -66,8 +59,7 @@ pub struct UpdateKeyspaceStateResponse { #[prost(message, optional, tag = "2")] pub keyspace: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetAllKeyspacesRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -76,7 +68,6 @@ pub struct GetAllKeyspacesRequest { #[prost(uint32, tag = "3")] pub limit: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAllKeyspacesResponse { #[prost(message, optional, tag = "1")] @@ -99,10 +90,10 @@ impl KeyspaceState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - KeyspaceState::Enabled => "ENABLED", - KeyspaceState::Disabled => "DISABLED", - KeyspaceState::Archived => "ARCHIVED", - KeyspaceState::Tombstone => "TOMBSTONE", + Self::Enabled => "ENABLED", + Self::Disabled => "DISABLED", + Self::Archived => "ARCHIVED", + Self::Tombstone => "TOMBSTONE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -118,7 +109,13 @@ impl KeyspaceState { } /// Generated client implementations. pub mod keyspace_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// Keyspace provides services to manage keyspaces. @@ -139,10 +136,10 @@ pub mod keyspace_client { } impl KeyspaceClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -160,14 +157,14 @@ pub mod keyspace_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { KeyspaceClient::new(InterceptedService::new(inner, interceptor)) } @@ -213,12 +210,11 @@ pub mod keyspace_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/keyspacepb.Keyspace/LoadKeyspace", ); @@ -240,12 +236,11 @@ pub mod keyspace_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/keyspacepb.Keyspace/WatchKeyspaces", ); @@ -265,12 +260,11 @@ pub mod keyspace_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/keyspacepb.Keyspace/UpdateKeyspaceState", ); @@ -290,12 +284,11 @@ pub mod keyspace_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/keyspacepb.Keyspace/GetAllKeyspaces", ); diff --git a/src/generated/kvrpcpb.rs b/src/generated/kvrpcpb.rs index 4bf66314..dc71db6d 100644 --- a/src/generated/kvrpcpb.rs +++ b/src/generated/kvrpcpb.rs @@ -1,7 +1,6 @@ // This file is @generated by prost-build. /// A transactional get command. Lookup a value for `key` in the transaction with /// starting timestamp = `version`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRequest { #[prost(message, optional, tag = "1")] @@ -11,7 +10,6 @@ pub struct GetRequest { #[prost(uint64, tag = "3")] pub version: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { /// A region error indicates that the request was sent to the wrong TiKV node @@ -33,7 +31,6 @@ pub struct GetResponse { } /// Scan fetches values for a range of keys; it is part of the transaction with /// starting timestamp = `version`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanRequest { #[prost(message, optional, tag = "1")] @@ -59,7 +56,6 @@ pub struct ScanRequest { #[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")] @@ -76,7 +72,6 @@ pub struct ScanResponse { /// A prewrite is the first phase of writing to TiKV. It contains all data to be written in a transaction. /// TiKV will write the data in a preliminary state. Data cannot be read until it has been committed. /// The client should only commit a transaction once all prewrites succeed. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrewriteRequest { #[prost(message, optional, tag = "1")] @@ -141,8 +136,7 @@ pub struct PrewriteRequest { /// Nested message and enum types in `PrewriteRequest`. pub mod prewrite_request { /// for_update_ts constriants that should be checked when prewriting a pessimistic transaction. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ForUpdateTsConstraint { /// The index of key in the prewrite request that should be checked. #[prost(uint32, tag = "1")] @@ -179,9 +173,9 @@ pub mod prewrite_request { /// (if the ProtoBuf definition does not change) and safe for programmatic use. 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", + Self::SkipPessimisticCheck => "SKIP_PESSIMISTIC_CHECK", + Self::DoPessimisticCheck => "DO_PESSIMISTIC_CHECK", + Self::DoConstraintCheck => "DO_CONSTRAINT_CHECK", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -195,7 +189,6 @@ pub mod prewrite_request { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrewriteResponse { #[prost(message, optional, tag = "1")] @@ -217,7 +210,6 @@ pub struct PrewriteResponse { pub exec_details_v2: ::core::option::Option, } /// Lock a set of keys to prepare to write to them. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticLockRequest { #[prost(message, optional, tag = "1")] @@ -272,8 +264,7 @@ pub struct PessimisticLockRequest { #[prost(enumeration = "PessimisticLockWakeUpMode", tag = "14")] pub wake_up_mode: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PessimisticLockKeyResult { #[prost(enumeration = "PessimisticLockKeyResultType", tag = "1")] pub r#type: i32, @@ -295,7 +286,6 @@ pub struct PessimisticLockKeyResult { #[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")] @@ -328,7 +318,6 @@ pub struct PessimisticLockResponse { pub results: ::prost::alloc::vec::Vec, } /// Unlock keys locked using `PessimisticLockRequest`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticRollbackRequest { #[prost(message, optional, tag = "1")] @@ -340,7 +329,6 @@ pub struct PessimisticRollbackRequest { #[prost(bytes = "vec", repeated, tag = "4")] pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PessimisticRollbackResponse { #[prost(message, optional, tag = "1")] @@ -352,7 +340,6 @@ pub struct PessimisticRollbackResponse { pub exec_details_v2: ::core::option::Option, } /// Used to update the lock_ttl of a psessimistic and/or large transaction to prevent it from been killed. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TxnHeartBeatRequest { #[prost(message, optional, tag = "1")] @@ -370,7 +357,6 @@ pub struct TxnHeartBeatRequest { #[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")] @@ -389,7 +375,6 @@ pub struct TxnHeartBeatResponse { /// If the TTL of the transaction is exhausted, abort that transaction and inform the caller. /// Otherwise, returns the TTL information for the transaction. /// CheckTxnStatusRequest may also push forward the minCommitTS of a large transaction. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckTxnStatusRequest { #[prost(message, optional, tag = "1")] @@ -432,7 +417,6 @@ pub struct CheckTxnStatusRequest { #[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")] @@ -459,7 +443,6 @@ pub struct CheckTxnStatusResponse { /// Part of the async commit protocol, checks for locks on all supplied keys. If a lock is missing, /// does not have a successful status, or belongs to another transaction, TiKV will leave a rollback /// tombstone for that key. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CheckSecondaryLocksRequest { #[prost(message, optional, tag = "1")] @@ -470,7 +453,6 @@ pub struct CheckSecondaryLocksRequest { #[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")] @@ -492,7 +474,6 @@ pub struct CheckSecondaryLocksResponse { } /// The second phase of writing to TiKV. If there are no errors or conflicts, then this request /// commits a transaction so that its data can be read by other transactions. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitRequest { #[prost(message, optional, tag = "1")] @@ -510,7 +491,6 @@ pub struct CommitRequest { #[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")] @@ -525,7 +505,6 @@ pub struct CommitResponse { pub exec_details_v2: ::core::option::Option, } /// Not yet implemented. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportRequest { #[prost(message, repeated, tag = "1")] @@ -533,7 +512,6 @@ pub struct ImportRequest { #[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")] @@ -543,7 +521,6 @@ pub struct ImportResponse { } /// Cleanup a key by possibly unlocking it. /// From 4.0 onwards, this message is no longer used. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CleanupRequest { #[prost(message, optional, tag = "1")] @@ -558,7 +535,6 @@ pub struct CleanupRequest { #[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")] @@ -570,7 +546,6 @@ pub struct CleanupResponse { pub commit_version: u64, } /// Similar to a `Get` request. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchGetRequest { #[prost(message, optional, tag = "1")] @@ -580,7 +555,6 @@ pub struct BatchGetRequest { #[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")] @@ -598,7 +572,6 @@ pub struct BatchGetResponse { } /// Rollback a prewritten transaction. This will remove the preliminary data from the database, /// unlock locks, and leave a rollback tombstone. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchRollbackRequest { #[prost(message, optional, tag = "1")] @@ -613,7 +586,6 @@ pub struct BatchRollbackRequest { #[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")] @@ -626,7 +598,6 @@ pub struct BatchRollbackResponse { } /// Scan the database for locks. Used at the start of the GC process to find all /// old locks. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanLockRequest { #[prost(message, optional, tag = "1")] @@ -644,7 +615,6 @@ pub struct ScanLockRequest { #[prost(bytes = "vec", tag = "5")] pub end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanLockResponse { #[prost(message, optional, tag = "1")] @@ -660,7 +630,6 @@ pub struct ScanLockResponse { } /// For all keys locked by the transaction identified by `start_version`, either /// commit or rollback the transaction and unlock the key. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResolveLockRequest { #[prost(message, optional, tag = "1")] @@ -680,7 +649,6 @@ pub struct ResolveLockRequest { #[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")] @@ -692,7 +660,6 @@ pub struct ResolveLockResponse { pub exec_details_v2: ::core::option::Option, } /// Request TiKV to garbage collect all non-current data older than `safe_point`. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcRequest { #[prost(message, optional, tag = "1")] @@ -700,7 +667,6 @@ pub struct GcRequest { #[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")] @@ -709,7 +675,6 @@ pub struct GcResponse { pub error: ::core::option::Option, } /// Delete a range of data from TiKV. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRangeRequest { #[prost(message, optional, tag = "1")] @@ -724,7 +689,6 @@ pub struct DeleteRangeRequest { #[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")] @@ -735,7 +699,6 @@ pub struct DeleteRangeResponse { /// Preparing the flashback for a region/key range will "lock" the region /// so that there is no any read, write or schedule operation could be proposed before /// the actual flashback operation. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrepareFlashbackToVersionRequest { #[prost(message, optional, tag = "1")] @@ -752,7 +715,6 @@ pub struct PrepareFlashbackToVersionRequest { #[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")] @@ -763,7 +725,6 @@ pub struct PrepareFlashbackToVersionResponse { /// Flashback the region to a specific point with the given `version`, please /// make sure the region is "locked" by `PrepareFlashbackToVersionRequest` first, /// otherwise this request will fail. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FlashbackToVersionRequest { #[prost(message, optional, tag = "1")] @@ -782,7 +743,6 @@ pub struct FlashbackToVersionRequest { #[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")] @@ -790,7 +750,6 @@ pub struct FlashbackToVersionResponse { #[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")] @@ -800,7 +759,6 @@ pub struct RawGetRequest { #[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")] @@ -812,7 +770,6 @@ pub struct RawGetResponse { #[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")] @@ -822,7 +779,6 @@ pub struct RawBatchGetRequest { #[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")] @@ -830,7 +786,6 @@ pub struct RawBatchGetResponse { #[prost(message, repeated, tag = "2")] pub pairs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawPutRequest { #[prost(message, optional, tag = "1")] @@ -846,7 +801,6 @@ pub struct RawPutRequest { #[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")] @@ -854,7 +808,6 @@ pub struct RawPutResponse { #[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")] @@ -874,7 +827,6 @@ pub struct RawBatchPutRequest { #[prost(uint64, repeated, tag = "6")] pub ttls: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawBatchPutResponse { #[prost(message, optional, tag = "1")] @@ -882,7 +834,6 @@ pub struct RawBatchPutResponse { #[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")] @@ -894,7 +845,6 @@ pub struct RawDeleteRequest { #[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")] @@ -902,7 +852,6 @@ pub struct RawDeleteResponse { #[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")] @@ -914,7 +863,6 @@ pub struct RawBatchDeleteRequest { #[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")] @@ -922,7 +870,6 @@ pub struct RawBatchDeleteResponse { #[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")] @@ -942,7 +889,6 @@ pub struct RawScanRequest { #[prost(bytes = "vec", tag = "7")] pub end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawScanResponse { #[prost(message, optional, tag = "1")] @@ -950,7 +896,6 @@ pub struct RawScanResponse { #[prost(message, repeated, tag = "2")] pub kvs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawDeleteRangeRequest { #[prost(message, optional, tag = "1")] @@ -962,7 +907,6 @@ pub struct RawDeleteRangeRequest { #[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")] @@ -970,7 +914,6 @@ pub struct RawDeleteRangeResponse { #[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")] @@ -988,7 +931,6 @@ pub struct RawBatchScanRequest { #[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")] @@ -996,7 +938,6 @@ pub struct RawBatchScanResponse { #[prost(message, repeated, tag = "2")] pub kvs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsafeDestroyRangeRequest { #[prost(message, optional, tag = "1")] @@ -1006,7 +947,6 @@ pub struct UnsafeDestroyRangeRequest { #[prost(bytes = "vec", tag = "3")] pub end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsafeDestroyRangeResponse { #[prost(message, optional, tag = "1")] @@ -1014,7 +954,6 @@ pub struct UnsafeDestroyRangeResponse { #[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")] @@ -1022,13 +961,11 @@ pub struct RegisterLockObserverRequest { #[prost(uint64, tag = "2")] pub max_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::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")] @@ -1036,7 +973,6 @@ pub struct CheckLockObserverRequest { #[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")] @@ -1046,7 +982,6 @@ pub struct CheckLockObserverResponse { #[prost(message, repeated, tag = "3")] pub locks: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RemoveLockObserverRequest { #[prost(message, optional, tag = "1")] @@ -1054,13 +989,11 @@ pub struct RemoveLockObserverRequest { #[prost(uint64, tag = "2")] pub max_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::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")] @@ -1072,7 +1005,6 @@ pub struct PhysicalScanLockRequest { #[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")] @@ -1081,7 +1013,6 @@ pub struct PhysicalScanLockResponse { pub locks: ::prost::alloc::vec::Vec, } /// Sent from PD to a TiKV node. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitRegionRequest { #[prost(message, optional, tag = "1")] @@ -1096,7 +1027,6 @@ pub struct SplitRegionRequest { #[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")] @@ -1114,7 +1044,6 @@ pub struct SplitRegionResponse { pub regions: ::prost::alloc::vec::Vec, } /// Sent from TiFlash to a TiKV node. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIndexRequest { #[prost(message, optional, tag = "1")] @@ -1126,7 +1055,6 @@ pub struct ReadIndexRequest { #[prost(message, repeated, tag = "3")] pub ranges: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIndexResponse { #[prost(message, optional, tag = "1")] @@ -1138,7 +1066,6 @@ pub struct ReadIndexResponse { #[prost(message, optional, tag = "3")] pub locked: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByKeyRequest { #[prost(message, optional, tag = "1")] @@ -1146,7 +1073,6 @@ pub struct MvccGetByKeyRequest { #[prost(bytes = "vec", tag = "2")] pub key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByKeyResponse { #[prost(message, optional, tag = "1")] @@ -1156,7 +1082,6 @@ pub struct MvccGetByKeyResponse { #[prost(message, optional, tag = "3")] pub info: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MvccGetByStartTsRequest { #[prost(message, optional, tag = "1")] @@ -1164,7 +1089,6 @@ pub struct MvccGetByStartTsRequest { #[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")] @@ -1177,7 +1101,6 @@ pub struct MvccGetByStartTsResponse { pub info: ::core::option::Option, } /// Miscellaneous metadata attached to most requests. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Context { #[prost(uint64, tag = "1")] @@ -1268,7 +1191,6 @@ pub struct Context { #[prost(message, optional, tag = "34")] pub source_stmt: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceControlContext { /// It's used to identify which resource group the request belongs to. @@ -1283,8 +1205,7 @@ pub struct ResourceControlContext { #[prost(uint64, tag = "3")] pub override_priority: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SourceStmt { #[prost(uint64, tag = "1")] pub start_ts: u64, @@ -1296,8 +1217,7 @@ pub struct SourceStmt { #[prost(string, tag = "4")] pub session_alias: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LockInfo { #[prost(bytes = "vec", tag = "1")] pub primary_lock: ::prost::alloc::vec::Vec, @@ -1330,7 +1250,6 @@ pub struct LockInfo { #[prost(bool, tag = "100")] pub is_txn_file: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyError { /// Client should backoff or cleanup the lock then retry. @@ -1367,8 +1286,7 @@ pub struct KeyError { #[prost(message, optional, tag = "11")] pub primary_mismatch: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WriteConflict { #[prost(uint64, tag = "1")] pub start_ts: u64, @@ -1417,12 +1335,12 @@ pub mod write_conflict { /// (if the ProtoBuf definition does not change) and safe for programmatic use. 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", + Self::Unknown => "Unknown", + Self::Optimistic => "Optimistic", + Self::PessimisticRetry => "PessimisticRetry", + Self::SelfRolledBack => "SelfRolledBack", + Self::RcCheckTs => "RcCheckTs", + Self::LazyUniquenessCheck => "LazyUniquenessCheck", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1439,13 +1357,11 @@ pub mod write_conflict { } } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AlreadyExist { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deadlock { #[prost(uint64, tag = "1")] @@ -1457,8 +1373,7 @@ pub struct Deadlock { #[prost(message, repeated, tag = "4")] pub wait_chain: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommitTsExpired { #[prost(uint64, tag = "1")] pub start_ts: u64, @@ -1469,23 +1384,20 @@ pub struct CommitTsExpired { #[prost(uint64, tag = "4")] pub min_commit_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::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, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommitTsTooLarge { /// The calculated commit TS. #[prost(uint64, tag = "1")] pub commit_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AssertionFailed { #[prost(uint64, tag = "1")] pub start_ts: u64, @@ -1498,14 +1410,12 @@ pub struct AssertionFailed { #[prost(uint64, tag = "5")] pub existing_commit_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrimaryMismatch { #[prost(message, optional, tag = "1")] pub lock_info: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TimeDetail { /// Off-cpu wall time elapsed in TiKV side. Usually this includes queue waiting time and /// other kind of waitings in series. (Wait time in the raftstore is not included.) @@ -1525,8 +1435,7 @@ pub struct TimeDetail { #[prost(uint64, tag = "4")] pub total_rpc_wall_time_ns: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TimeDetailV2 { /// Off-cpu wall time elapsed in TiKV side. Usually this includes queue waiting time and /// other kind of waitings in series. (Wait time in the raftstore is not included.) @@ -1549,8 +1458,7 @@ pub struct TimeDetailV2 { #[prost(uint64, tag = "5")] pub total_rpc_wall_time_ns: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScanInfo { #[prost(int64, tag = "1")] pub total: i64, @@ -1560,8 +1468,7 @@ pub struct ScanInfo { pub read_bytes: i64, } /// Only reserved for compatibility. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScanDetail { #[prost(message, optional, tag = "1")] pub write: ::core::option::Option, @@ -1570,8 +1477,7 @@ pub struct ScanDetail { #[prost(message, optional, tag = "3")] pub data: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScanDetailV2 { /// Number of user keys scanned from the storage. /// It does not include deleted version or RocksDB tombstone keys. @@ -1623,8 +1529,7 @@ pub struct ScanDetailV2 { #[prost(uint64, tag = "13")] pub read_pool_schedule_wait_nanos: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExecDetails { /// Available when ctx.record_time_stat = true or meet slow query. #[prost(message, optional, tag = "1")] @@ -1633,8 +1538,7 @@ pub struct ExecDetails { #[prost(message, optional, tag = "2")] pub scan_detail: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ExecDetailsV2 { /// Available when ctx.record_time_stat = true or meet slow query. /// deprecated. Should use `time_detail_v2` instead. @@ -1650,8 +1554,7 @@ pub struct ExecDetailsV2 { #[prost(message, optional, tag = "4")] pub time_detail_v2: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct WriteDetail { /// Wait duration in the store loop. #[prost(uint64, tag = "1")] @@ -1705,7 +1608,6 @@ pub struct WriteDetail { #[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")] @@ -1715,8 +1617,7 @@ pub struct KvPair { #[prost(bytes = "vec", tag = "3")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Mutation { #[prost(enumeration = "Op", tag = "1")] pub op: i32, @@ -1727,8 +1628,7 @@ pub struct Mutation { #[prost(enumeration = "Assertion", tag = "4")] pub assertion: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MvccWrite { #[prost(enumeration = "Op", tag = "1")] pub r#type: i32, @@ -1749,16 +1649,14 @@ pub struct MvccWrite { #[prost(uint64, tag = "9")] pub versions_to_last_change: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MvccValue { #[prost(uint64, tag = "1")] pub start_ts: u64, #[prost(bytes = "vec", tag = "2")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MvccLock { #[prost(enumeration = "Op", tag = "1")] pub r#type: i32, @@ -1785,7 +1683,6 @@ pub struct MvccLock { #[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")] @@ -1795,8 +1692,7 @@ pub struct MvccInfo { #[prost(message, repeated, tag = "3")] pub values: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TxnInfo { #[prost(uint64, tag = "1")] pub txn: u64, @@ -1806,16 +1702,14 @@ pub struct TxnInfo { #[prost(bool, tag = "100")] pub is_txn_file: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeyRange { #[prost(bytes = "vec", tag = "1")] pub start_key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct LeaderInfo { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -1828,15 +1722,13 @@ pub struct LeaderInfo { #[prost(message, optional, tag = "5")] pub read_state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::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")] @@ -1844,29 +1736,25 @@ pub struct CheckLeaderRequest { #[prost(uint64, tag = "2")] pub ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CheckLeaderResponse { #[prost(uint64, repeated, tag = "1")] pub regions: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] pub ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreSafeTsRequest { /// Get the minimal `safe_ts` from regions that overlap with the key range \[`start_key`, `end_key`) /// An empty key range means all regions in the store #[prost(message, optional, tag = "1")] pub key_range: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::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")] @@ -1876,7 +1764,6 @@ pub struct RawGetKeyTtlRequest { #[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")] @@ -1888,7 +1775,6 @@ pub struct RawGetKeyTtlResponse { #[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")] @@ -1906,7 +1792,6 @@ pub struct RawCasRequest { #[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")] @@ -1921,7 +1806,6 @@ pub struct RawCasResponse { #[prost(bytes = "vec", tag = "5")] pub previous_value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLockWaitInfoRequest { /// TODO: There may need some filter options to be used on conditional querying, e.g., finding @@ -1929,7 +1813,6 @@ pub struct GetLockWaitInfoRequest { #[prost(message, optional, tag = "1")] pub context: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLockWaitInfoResponse { #[prost(message, optional, tag = "1")] @@ -1939,7 +1822,6 @@ pub struct GetLockWaitInfoResponse { #[prost(message, repeated, tag = "3")] pub entries: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLockWaitHistoryRequest { /// TODO: There may need some filter options to be used on conditional querying, e.g., finding @@ -1947,7 +1829,6 @@ pub struct GetLockWaitHistoryRequest { #[prost(message, optional, tag = "1")] pub context: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLockWaitHistoryResponse { #[prost(message, optional, tag = "1")] @@ -1957,7 +1838,6 @@ pub struct GetLockWaitHistoryResponse { #[prost(message, repeated, tag = "3")] pub entries: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawCoprocessorRequest { #[prost(message, optional, tag = "1")] @@ -1972,7 +1852,6 @@ pub struct RawCoprocessorRequest { #[prost(bytes = "vec", tag = "5")] pub data: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawCoprocessorResponse { #[prost(message, optional, tag = "1")] @@ -1984,7 +1863,6 @@ pub struct RawCoprocessorResponse { #[prost(bytes = "vec", tag = "3")] pub data: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawChecksumRequest { #[prost(message, optional, tag = "1")] @@ -1994,7 +1872,6 @@ pub struct RawChecksumRequest { #[prost(message, repeated, tag = "3")] pub ranges: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RawChecksumResponse { #[prost(message, optional, tag = "1")] @@ -2008,16 +1885,14 @@ pub struct RawChecksumResponse { #[prost(uint64, tag = "5")] pub total_bytes: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactError { #[prost(oneof = "compact_error::Error", tags = "1, 2, 3, 4")] pub error: ::core::option::Option, } /// Nested message and enum types in `CompactError`. pub mod compact_error { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Error { #[prost(message, tag = "1")] ErrInvalidStartKey(super::CompactErrorInvalidStartKey), @@ -2029,20 +1904,15 @@ pub mod compact_error { ErrTooManyPendingTasks(super::CompactErrorTooManyPendingTasks), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactErrorInvalidStartKey {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactErrorPhysicalTableNotExist {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactErrorCompactInProgress {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactErrorTooManyPendingTasks {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactRequest { /// If specified, the compaction will start from this start key. /// If unspecified, the compaction will start from beginning. @@ -2071,8 +1941,7 @@ pub struct CompactRequest { #[prost(uint32, tag = "8")] pub keyspace_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, @@ -2085,14 +1954,12 @@ pub struct CompactResponse { #[prost(bytes = "vec", tag = "4")] pub compacted_end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::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)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TiFlashSystemTableResponse { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, @@ -2119,8 +1986,8 @@ impl PessimisticLockWakeUpMode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - PessimisticLockWakeUpMode::WakeUpModeNormal => "WakeUpModeNormal", - PessimisticLockWakeUpMode::WakeUpModeForceLock => "WakeUpModeForceLock", + Self::WakeUpModeNormal => "WakeUpModeNormal", + Self::WakeUpModeForceLock => "WakeUpModeForceLock", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2146,11 +2013,9 @@ impl PessimisticLockKeyResultType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - PessimisticLockKeyResultType::LockResultNormal => "LockResultNormal", - PessimisticLockKeyResultType::LockResultLockedWithConflict => { - "LockResultLockedWithConflict" - } - PessimisticLockKeyResultType::LockResultFailed => "LockResultFailed", + Self::LockResultNormal => "LockResultNormal", + Self::LockResultLockedWithConflict => "LockResultLockedWithConflict", + Self::LockResultFailed => "LockResultFailed", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2208,11 +2073,9 @@ pub enum ApiVersion { /// /// ## Bit 1 is for deletion. If set, the entry is logical deleted. /// - /// |Meta flags| - /// |----------| - /// |0x02 (0b00000010)| + /// ## \| Meta flags | /// - /// --- + /// ## \| 0x02 (0b00000010) | /// /// V2 server accpets V2 requests and V1 transactional requests that statrts with TiDB key /// prefix (`m` and `t`). @@ -2225,9 +2088,9 @@ impl ApiVersion { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ApiVersion::V1 => "V1", - ApiVersion::V1ttl => "V1TTL", - ApiVersion::V2 => "V2", + Self::V1 => "V1", + Self::V1ttl => "V1TTL", + Self::V2 => "V2", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2255,9 +2118,9 @@ impl CommandPri { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CommandPri::Normal => "Normal", - CommandPri::Low => "Low", - CommandPri::High => "High", + Self::Normal => "Normal", + Self::Low => "Low", + Self::High => "High", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2287,9 +2150,9 @@ impl IsolationLevel { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - IsolationLevel::Si => "SI", - IsolationLevel::Rc => "RC", - IsolationLevel::RcCheckTs => "RCCheckTS", + Self::Si => "SI", + Self::Rc => "RC", + Self::RcCheckTs => "RCCheckTS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2320,9 +2183,9 @@ impl DiskFullOpt { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - DiskFullOpt::NotAllowedOnFull => "NotAllowedOnFull", - DiskFullOpt::AllowedOnAlmostFull => "AllowedOnAlmostFull", - DiskFullOpt::AllowedOnAlreadyFull => "AllowedOnAlreadyFull", + Self::NotAllowedOnFull => "NotAllowedOnFull", + Self::AllowedOnAlmostFull => "AllowedOnAlmostFull", + Self::AllowedOnAlreadyFull => "AllowedOnAlreadyFull", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2354,13 +2217,13 @@ impl Op { /// (if the ProtoBuf definition does not change) and safe for programmatic use. 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", + Self::Put => "Put", + Self::Del => "Del", + Self::Lock => "Lock", + Self::Rollback => "Rollback", + Self::Insert => "Insert", + Self::PessimisticLock => "PessimisticLock", + Self::CheckNotExists => "CheckNotExists", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2391,9 +2254,9 @@ impl Assertion { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Assertion::None => "None", - Assertion::Exist => "Exist", - Assertion::NotExist => "NotExist", + Self::None => "None", + Self::Exist => "Exist", + Self::NotExist => "NotExist", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2423,9 +2286,9 @@ impl AssertionLevel { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - AssertionLevel::Off => "Off", - AssertionLevel::Fast => "Fast", - AssertionLevel::Strict => "Strict", + Self::Off => "Off", + Self::Fast => "Fast", + Self::Strict => "Strict", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2455,12 +2318,12 @@ impl Action { /// (if the ProtoBuf definition does not change) and safe for programmatic use. 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", + Self::NoAction => "NoAction", + Self::TtlExpireRollback => "TTLExpireRollback", + Self::LockNotExistRollback => "LockNotExistRollback", + Self::MinCommitTsPushed => "MinCommitTSPushed", + Self::TtlExpirePessimisticRollback => "TTLExpirePessimisticRollback", + Self::LockNotExistDoNothing => "LockNotExistDoNothing", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2490,8 +2353,8 @@ impl ExtraOp { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ExtraOp::Noop => "Noop", - ExtraOp::ReadOldValue => "ReadOldValue", + Self::Noop => "Noop", + Self::ReadOldValue => "ReadOldValue", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2515,7 +2378,7 @@ impl ChecksumAlgorithm { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ChecksumAlgorithm::Crc64Xor => "Crc64_Xor", + Self::Crc64Xor => "Crc64_Xor", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/logbackup.rs b/src/generated/logbackup.rs index 51b3cf5f..4d756593 100644 --- a/src/generated/logbackup.rs +++ b/src/generated/logbackup.rs @@ -1,7 +1,6 @@ // This file is @generated by prost-build. /// The minimal information for identify a region. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionIdentity { #[prost(uint64, tag = "1")] pub id: u64, @@ -10,7 +9,6 @@ pub struct RegionIdentity { pub epoch_version: u64, } /// The last flush ts with region information. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionCheckpoint { #[prost(message, optional, tag = "1")] @@ -20,32 +18,27 @@ pub struct RegionCheckpoint { #[prost(uint64, tag = "3")] pub checkpoint: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLastFlushTsOfRegionRequest { #[prost(message, repeated, tag = "1")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLastFlushTsOfRegionResponse { #[prost(message, repeated, tag = "1")] pub checkpoints: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SubscribeFlushEventRequest { #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeFlushEventResponse { #[prost(message, repeated, tag = "1")] pub events: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FlushEvent { #[prost(bytes = "vec", tag = "1")] pub start_key: ::prost::alloc::vec::Vec, @@ -56,7 +49,13 @@ pub struct FlushEvent { } /// Generated client implementations. pub mod log_backup_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// The log backup service. @@ -80,10 +79,10 @@ pub mod log_backup_client { } impl LogBackupClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -101,14 +100,14 @@ pub mod log_backup_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { LogBackupClient::new(InterceptedService::new(inner, interceptor)) } @@ -154,12 +153,11 @@ pub mod log_backup_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/logbackup.LogBackup/GetLastFlushTSOfRegion", ); @@ -181,12 +179,11 @@ pub mod log_backup_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/logbackup.LogBackup/SubscribeFlushEvent", ); diff --git a/src/generated/meta_storagepb.rs b/src/generated/meta_storagepb.rs index 1355ebd6..4c725dc6 100644 --- a/src/generated/meta_storagepb.rs +++ b/src/generated/meta_storagepb.rs @@ -1,14 +1,12 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(enumeration = "ErrorType", tag = "1")] pub r#type: i32, #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RequestHeader { /// cluster_id is the ID of the cluster which be sent to. #[prost(uint64, tag = "1")] @@ -17,8 +15,7 @@ pub struct RequestHeader { #[prost(string, tag = "2")] pub source: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResponseHeader { /// cluster_id is the ID of the cluster which sent the response. #[prost(uint64, tag = "1")] @@ -29,8 +26,7 @@ pub struct ResponseHeader { pub revision: i64, } /// copied part of -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WatchRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -44,7 +40,6 @@ pub struct WatchRequest { pub prev_kv: bool, } /// copied part of -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WatchResponse { #[prost(message, optional, tag = "1")] @@ -55,8 +50,7 @@ pub struct WatchResponse { pub events: ::prost::alloc::vec::Vec, } /// copied part of -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -70,7 +64,6 @@ pub struct GetRequest { pub revision: i64, } /// copied part of -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { #[prost(message, optional, tag = "1")] @@ -83,8 +76,7 @@ pub struct GetResponse { pub count: i64, } /// copied part of -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -98,8 +90,7 @@ pub struct PutRequest { pub prev_kv: bool, } /// copied part of -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -107,8 +98,7 @@ pub struct PutResponse { pub prev_kv: ::core::option::Option, } /// copied from etcd -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeyValue { /// key is the key in bytes. An empty key is not allowed. #[prost(bytes = "vec", tag = "1")] @@ -134,8 +124,7 @@ pub struct KeyValue { pub lease: i64, } /// copied from etcd -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Event { /// type is the kind of event. If type is a PUT, it indicates /// new data has been stored to the key. If type is a DELETE, @@ -178,8 +167,8 @@ pub mod event { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EventType::Put => "PUT", - EventType::Delete => "DELETE", + Self::Put => "PUT", + Self::Delete => "DELETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -207,9 +196,9 @@ impl ErrorType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ErrorType::Ok => "OK", - ErrorType::Unknown => "UNKNOWN", - ErrorType::DataCompacted => "DATA_COMPACTED", + Self::Ok => "OK", + Self::Unknown => "UNKNOWN", + Self::DataCompacted => "DATA_COMPACTED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -224,7 +213,13 @@ impl ErrorType { } /// Generated client implementations. pub mod meta_storage_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// MetaStorage is the meta storage service. @@ -245,10 +240,10 @@ pub mod meta_storage_client { } impl MetaStorageClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -266,14 +261,14 @@ pub mod meta_storage_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { MetaStorageClient::new(InterceptedService::new(inner, interceptor)) } @@ -319,12 +314,11 @@ pub mod meta_storage_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/meta_storagepb.MetaStorage/Watch", ); @@ -343,12 +337,11 @@ pub mod meta_storage_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/meta_storagepb.MetaStorage/Get", ); @@ -365,12 +358,11 @@ pub mod meta_storage_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/meta_storagepb.MetaStorage/Put", ); diff --git a/src/generated/metapb.rs b/src/generated/metapb.rs index 8839fb0f..b88ada32 100644 --- a/src/generated/metapb.rs +++ b/src/generated/metapb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Cluster { #[prost(uint64, tag = "1")] pub id: u64, @@ -12,15 +11,13 @@ pub struct Cluster { pub max_peer_count: u32, } /// Case insensitive key/value for replica constraints. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreLabel { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub value: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Store { #[prost(uint64, tag = "1")] @@ -58,8 +55,7 @@ pub struct Store { #[prost(enumeration = "NodeState", tag = "13")] pub node_state: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionEpoch { /// Conf change version, auto increment when add or remove peer #[prost(uint64, tag = "1")] @@ -68,8 +64,7 @@ pub struct RegionEpoch { #[prost(uint64, tag = "2")] pub version: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BucketStats { /// total read in bytes of each bucket #[prost(uint64, repeated, tag = "1")] @@ -90,8 +85,7 @@ pub struct BucketStats { #[prost(uint64, repeated, tag = "6")] pub write_keys: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Buckets { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -108,7 +102,6 @@ pub struct Buckets { #[prost(uint64, tag = "5")] pub period_in_ms: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Region { #[prost(uint64, tag = "1")] @@ -136,8 +129,7 @@ pub struct Region { #[prost(uint64, tag = "8")] pub flashback_start_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Peer { #[prost(uint64, tag = "1")] pub id: u64, @@ -162,9 +154,9 @@ impl StoreState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StoreState::Up => "Up", - StoreState::Offline => "Offline", - StoreState::Tombstone => "Tombstone", + Self::Up => "Up", + Self::Offline => "Offline", + Self::Tombstone => "Tombstone", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -196,10 +188,10 @@ impl NodeState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - NodeState::Preparing => "Preparing", - NodeState::Serving => "Serving", - NodeState::Removing => "Removing", - NodeState::Removed => "Removed", + Self::Preparing => "Preparing", + Self::Serving => "Serving", + Self::Removing => "Removing", + Self::Removed => "Removed", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -237,10 +229,10 @@ impl PeerRole { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - PeerRole::Voter => "Voter", - PeerRole::Learner => "Learner", - PeerRole::IncomingVoter => "IncomingVoter", - PeerRole::DemotingVoter => "DemotingVoter", + Self::Voter => "Voter", + Self::Learner => "Learner", + Self::IncomingVoter => "IncomingVoter", + Self::DemotingVoter => "DemotingVoter", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/mpp.rs b/src/generated/mpp.rs index e68ab94b..e764b88d 100644 --- a/src/generated/mpp.rs +++ b/src/generated/mpp.rs @@ -1,7 +1,6 @@ // This file is @generated by prost-build. /// TaskMeta contains meta of a mpp plan, including query's ts and task address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TaskMeta { /// start ts of a query #[prost(uint64, tag = "1")] @@ -51,11 +50,9 @@ pub struct TaskMeta { #[prost(string, tag = "19")] pub connection_alias: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsAliveRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsAliveResponse { #[prost(bool, tag = "1")] pub available: bool, @@ -63,7 +60,6 @@ pub struct IsAliveResponse { pub mpp_version: i64, } /// Dipsatch the task request to different tiflash servers. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DispatchTaskRequest { #[prost(message, optional, tag = "1")] @@ -82,7 +78,6 @@ pub struct DispatchTaskRequest { pub table_regions: ::prost::alloc::vec::Vec, } /// Get response of DispatchTaskRequest. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DispatchTaskResponse { #[prost(message, optional, tag = "1")] @@ -91,24 +86,21 @@ pub struct DispatchTaskResponse { pub retry_regions: ::prost::alloc::vec::Vec, } /// CancelTaskRequest closes the execution of a task. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CancelTaskRequest { #[prost(message, optional, tag = "1")] pub meta: ::core::option::Option, #[prost(message, optional, tag = "2")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CancelTaskResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } /// ReportTaskStatus reports the execution status of a task. /// when TiFlash reports status to TiDB, ReportTaskStatusRequest serialize tipb.TiFlashExecutionInfo into data; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportTaskStatusRequest { #[prost(message, optional, tag = "1")] pub meta: ::core::option::Option, @@ -117,15 +109,13 @@ pub struct ReportTaskStatusRequest { #[prost(message, optional, tag = "3")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportTaskStatusResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } /// build connection between different tasks. Data is sent by the tasks that are closer to the data sources. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct EstablishMppConnectionRequest { /// node closer to the source #[prost(message, optional, tag = "1")] @@ -136,8 +126,7 @@ pub struct EstablishMppConnectionRequest { } /// when TiFlash sends data to TiDB, Data packets wrap tipb.SelectResponse, i.e., serialize tipb.SelectResponse into data; /// when TiFlash sends data to TiFlash, data blocks are serialized into chunks, and the execution_summaries in tipb.SelectResponse are serialized into data only for the last packet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MppDataPacket { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, @@ -151,8 +140,7 @@ pub struct MppDataPacket { #[prost(int64, tag = "5")] pub version: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(int32, tag = "1")] pub code: i32, diff --git a/src/generated/pdpb.rs b/src/generated/pdpb.rs index 548b333c..24204eb4 100644 --- a/src/generated/pdpb.rs +++ b/src/generated/pdpb.rs @@ -1,13 +1,11 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WatchGlobalConfigRequest { #[prost(string, tag = "1")] pub config_path: ::prost::alloc::string::String, #[prost(int64, tag = "2")] pub revision: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WatchGlobalConfigResponse { #[prost(message, repeated, tag = "1")] @@ -17,7 +15,6 @@ pub struct WatchGlobalConfigResponse { #[prost(message, optional, tag = "3")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreGlobalConfigRequest { #[prost(message, repeated, tag = "1")] @@ -25,21 +22,18 @@ pub struct StoreGlobalConfigRequest { #[prost(string, tag = "2")] pub config_path: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreGlobalConfigResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LoadGlobalConfigRequest { #[prost(string, repeated, tag = "1")] pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, tag = "2")] pub config_path: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LoadGlobalConfigResponse { #[prost(message, repeated, tag = "1")] @@ -47,8 +41,7 @@ pub struct LoadGlobalConfigResponse { #[prost(int64, tag = "2")] pub revision: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GlobalConfigItem { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, @@ -64,8 +57,7 @@ pub struct GlobalConfigItem { #[prost(bytes = "vec", tag = "5")] pub payload: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RequestHeader { /// cluster_id is the ID of the cluster which be sent to. #[prost(uint64, tag = "1")] @@ -74,8 +66,7 @@ pub struct RequestHeader { #[prost(uint64, tag = "2")] pub sender_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResponseHeader { /// cluster_id is the ID of the cluster which sent the response. #[prost(uint64, tag = "1")] @@ -83,16 +74,14 @@ pub struct ResponseHeader { #[prost(message, optional, tag = "2")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(enumeration = "ErrorType", tag = "1")] pub r#type: i32, #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TsoRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -101,8 +90,7 @@ pub struct TsoRequest { #[prost(string, tag = "3")] pub dc_location: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Timestamp { #[prost(int64, tag = "1")] pub physical: i64, @@ -113,8 +101,7 @@ pub struct Timestamp { #[prost(uint32, tag = "3")] pub suffix_bits: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TsoResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -123,7 +110,6 @@ pub struct TsoResponse { #[prost(message, optional, tag = "3")] pub timestamp: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BootstrapRequest { #[prost(message, optional, tag = "1")] @@ -133,8 +119,7 @@ pub struct BootstrapRequest { #[prost(message, optional, tag = "3")] pub region: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BootstrapResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -143,57 +128,49 @@ pub struct BootstrapResponse { super::replication_modepb::ReplicationStatus, >, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsBootstrappedRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsBootstrappedResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(bool, tag = "2")] pub bootstrapped: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct AllocIdRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AllocIdResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsSnapshotRecoveringRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IsSnapshotRecoveringResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(bool, tag = "2")] pub marked: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetStoreRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub store_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetStoreResponse { #[prost(message, optional, tag = "1")] @@ -203,7 +180,6 @@ pub struct GetStoreResponse { #[prost(message, optional, tag = "3")] pub stats: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutStoreRequest { #[prost(message, optional, tag = "1")] @@ -211,8 +187,7 @@ pub struct PutStoreRequest { #[prost(message, optional, tag = "2")] pub store: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutStoreResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -221,8 +196,7 @@ pub struct PutStoreResponse { super::replication_modepb::ReplicationStatus, >, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetAllStoresRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -230,7 +204,6 @@ pub struct GetAllStoresRequest { #[prost(bool, tag = "2")] pub exclude_tombstone_stores: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAllStoresResponse { #[prost(message, optional, tag = "1")] @@ -238,8 +211,7 @@ pub struct GetAllStoresResponse { #[prost(message, repeated, tag = "2")] pub stores: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRegionRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -248,7 +220,6 @@ pub struct GetRegionRequest { #[prost(bool, tag = "3")] pub need_buckets: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRegionResponse { #[prost(message, optional, tag = "1")] @@ -268,8 +239,7 @@ pub struct GetRegionResponse { #[prost(message, optional, tag = "7")] pub buckets: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRegionByIdRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -278,8 +248,7 @@ pub struct GetRegionByIdRequest { #[prost(bool, tag = "3")] pub need_buckets: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScanRegionsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -292,7 +261,6 @@ pub struct ScanRegionsRequest { #[prost(bytes = "vec", tag = "4")] pub end_key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Region { #[prost(message, optional, tag = "1")] @@ -307,7 +275,6 @@ pub struct Region { #[prost(message, repeated, tag = "4")] pub pending_peers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScanRegionsResponse { #[prost(message, optional, tag = "1")] @@ -321,36 +288,31 @@ pub struct ScanRegionsResponse { #[prost(message, repeated, tag = "4")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterConfigRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterConfigResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(message, optional, tag = "2")] pub cluster: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutClusterConfigRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(message, optional, tag = "2")] pub cluster: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutClusterConfigResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Member { /// name is the name of the PD member. #[prost(string, tag = "1")] @@ -373,13 +335,11 @@ pub struct Member { #[prost(string, tag = "9")] pub dc_location: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMembersRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMembersResponse { #[prost(message, optional, tag = "1")] @@ -396,14 +356,12 @@ pub struct GetMembersResponse { Member, >, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterInfoRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetClusterInfoResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -414,15 +372,13 @@ pub struct GetClusterInfoResponse { #[prost(string, repeated, tag = "3")] pub tso_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PeerStats { #[prost(message, optional, tag = "1")] pub peer: ::core::option::Option, #[prost(uint64, tag = "2")] pub down_seconds: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionHeartbeatRequest { #[prost(message, optional, tag = "1")] @@ -477,22 +433,19 @@ pub struct RegionHeartbeatRequest { #[prost(uint64, tag = "18")] pub approximate_kv_size: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ChangePeer { #[prost(message, optional, tag = "1")] pub peer: ::core::option::Option, #[prost(enumeration = "super::eraftpb::ConfChangeType", tag = "2")] pub change_type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeerV2 { /// If changes is empty, it means that to exit joint state. #[prost(message, repeated, tag = "1")] pub changes: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransferLeader { #[prost(message, optional, tag = "1")] @@ -500,35 +453,30 @@ pub struct TransferLeader { #[prost(message, repeated, tag = "2")] pub peers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Merge { #[prost(message, optional, tag = "1")] pub target: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitRegion { #[prost(enumeration = "CheckPolicy", tag = "1")] pub policy: i32, #[prost(bytes = "vec", repeated, tag = "2")] pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SwitchWitness { #[prost(uint64, tag = "1")] pub peer_id: u64, #[prost(bool, tag = "2")] pub is_witness: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchSwitchWitness { #[prost(message, repeated, tag = "1")] pub switch_witnesses: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionHeartbeatResponse { #[prost(message, optional, tag = "1")] @@ -577,7 +525,6 @@ pub struct RegionHeartbeatResponse { #[prost(message, optional, tag = "10")] pub switch_witnesses: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskSplitRequest { #[prost(message, optional, tag = "1")] @@ -585,8 +532,7 @@ pub struct AskSplitRequest { #[prost(message, optional, tag = "2")] pub region: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AskSplitResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -599,7 +545,6 @@ pub struct AskSplitResponse { #[prost(uint64, repeated, tag = "3")] pub new_peer_ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportSplitRequest { #[prost(message, optional, tag = "1")] @@ -609,13 +554,11 @@ pub struct ReportSplitRequest { #[prost(message, optional, tag = "3")] pub right: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportSplitResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskBatchSplitRequest { #[prost(message, optional, tag = "1")] @@ -625,15 +568,13 @@ pub struct AskBatchSplitRequest { #[prost(uint32, tag = "3")] pub split_count: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitId { #[prost(uint64, tag = "1")] pub new_region_id: u64, #[prost(uint64, repeated, tag = "2")] pub new_peer_ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskBatchSplitResponse { #[prost(message, optional, tag = "1")] @@ -641,7 +582,6 @@ pub struct AskBatchSplitResponse { #[prost(message, repeated, tag = "2")] pub ids: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReportBatchSplitRequest { #[prost(message, optional, tag = "1")] @@ -649,14 +589,12 @@ pub struct ReportBatchSplitRequest { #[prost(message, repeated, tag = "2")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportBatchSplitResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TimeInterval { /// The unix timestamp in seconds of the start of this period. #[prost(uint64, tag = "1")] @@ -665,16 +603,14 @@ pub struct TimeInterval { #[prost(uint64, tag = "2")] pub end_timestamp: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecordPair { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(uint64, tag = "2")] pub value: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PeerStat { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -689,7 +625,6 @@ pub struct PeerStat { #[prost(uint64, tag = "6")] pub written_bytes: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreStats { #[prost(uint64, tag = "1")] @@ -778,8 +713,7 @@ pub struct StoreStats { #[prost(uint64, tag = "29")] pub used_memory: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SlowTrend { #[prost(double, tag = "1")] pub cause_value: f64, @@ -790,8 +724,7 @@ pub struct SlowTrend { #[prost(double, tag = "4")] pub result_rate: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SnapshotStat { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -810,7 +743,6 @@ pub struct SnapshotStat { #[prost(uint64, tag = "5")] pub transport_size: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeerReport { #[prost(message, optional, tag = "1")] @@ -823,7 +755,6 @@ pub struct PeerReport { #[prost(bool, tag = "4")] pub has_commit_merge: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreReport { #[prost(message, repeated, tag = "1")] @@ -831,7 +762,6 @@ pub struct StoreReport { #[prost(uint64, tag = "2")] pub step: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreHeartbeatRequest { #[prost(message, optional, tag = "1")] @@ -846,7 +776,6 @@ pub struct StoreHeartbeatRequest { super::replication_modepb::StoreDrAutoSyncStatus, >, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DemoteFailedVoters { #[prost(uint64, tag = "1")] @@ -854,8 +783,7 @@ pub struct DemoteFailedVoters { #[prost(message, repeated, tag = "2")] pub failed_voters: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ForceLeader { /// The store ids of the failed stores, TiKV uses it to decide if a peer is alive. #[prost(uint64, repeated, tag = "1")] @@ -864,7 +792,6 @@ pub struct ForceLeader { #[prost(uint64, repeated, tag = "2")] pub enter_force_leaders: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecoveryPlan { /// Create empty regions to fill the key range hole. @@ -888,20 +815,17 @@ pub struct RecoveryPlan { #[prost(uint64, tag = "6")] pub step: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AwakenRegions { /// Awake all regions if abnormal_stores is empty. #[prost(uint64, repeated, tag = "1")] pub abnormal_stores: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ControlGrpc { #[prost(enumeration = "ControlGrpcEvent", tag = "1")] pub ctrl_event: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreHeartbeatResponse { #[prost(message, optional, tag = "1")] @@ -929,7 +853,6 @@ pub struct StoreHeartbeatResponse { #[prost(message, optional, tag = "7")] pub control_grpc: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScatterRegionRequest { #[prost(message, optional, tag = "1")] @@ -955,46 +878,40 @@ pub struct ScatterRegionRequest { #[prost(bool, tag = "8")] pub skip_store_limit: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScatterRegionResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub finished_percentage: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetGcSafePointRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetGcSafePointResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcSafePointRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcSafePointResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub new_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateServiceGcSafePointRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1005,8 +922,7 @@ pub struct UpdateServiceGcSafePointRequest { #[prost(uint64, tag = "4")] pub safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateServiceGcSafePointResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1017,24 +933,21 @@ pub struct UpdateServiceGcSafePointResponse { #[prost(uint64, tag = "4")] pub min_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetGcSafePointV2Request { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint32, tag = "2")] pub keyspace_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetGcSafePointV2Response { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct WatchGcSafePointV2Request { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1042,8 +955,7 @@ pub struct WatchGcSafePointV2Request { pub revision: i64, } /// SafePointEvent is for the rpc WatchGCSafePointV2. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SafePointEvent { #[prost(uint32, tag = "1")] pub keyspace_id: u32, @@ -1052,7 +964,6 @@ pub struct SafePointEvent { #[prost(enumeration = "EventType", tag = "3")] pub r#type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WatchGcSafePointV2Response { #[prost(message, optional, tag = "1")] @@ -1062,8 +973,7 @@ pub struct WatchGcSafePointV2Response { #[prost(int64, tag = "3")] pub revision: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcSafePointV2Request { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1072,16 +982,14 @@ pub struct UpdateGcSafePointV2Request { #[prost(uint64, tag = "3")] pub safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcSafePointV2Response { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub new_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateServiceSafePointV2Request { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1099,8 +1007,7 @@ pub struct UpdateServiceSafePointV2Request { #[prost(int64, tag = "5")] pub ttl: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateServiceSafePointV2Response { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1111,21 +1018,18 @@ pub struct UpdateServiceSafePointV2Response { #[prost(uint64, tag = "4")] pub min_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetAllGcSafePointV2Request { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GcSafePointV2 { #[prost(uint32, tag = "1")] pub keyspace_id: u32, #[prost(uint64, tag = "2")] pub gc_safe_point: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetAllGcSafePointV2Response { #[prost(message, optional, tag = "1")] @@ -1135,8 +1039,7 @@ pub struct GetAllGcSafePointV2Response { #[prost(int64, tag = "3")] pub revision: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionStat { /// Bytes read/written during this period. #[prost(uint64, tag = "1")] @@ -1149,8 +1052,7 @@ pub struct RegionStat { #[prost(uint64, tag = "4")] pub keys_read: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SyncRegionRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1161,19 +1063,16 @@ pub struct SyncRegionRequest { #[prost(uint64, tag = "3")] pub start_index: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeersStats { #[prost(message, repeated, tag = "1")] pub peers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Peers { #[prost(message, repeated, tag = "1")] pub peers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SyncRegionResponse { #[prost(message, optional, tag = "1")] @@ -1196,16 +1095,14 @@ pub struct SyncRegionResponse { #[prost(message, repeated, tag = "17")] pub pending_peers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOperatorRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOperatorResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1218,8 +1115,7 @@ pub struct GetOperatorResponse { #[prost(bytes = "vec", tag = "5")] pub kind: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SyncMaxTsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1229,8 +1125,7 @@ pub struct SyncMaxTsRequest { #[prost(bool, tag = "3")] pub skip_check: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SyncMaxTsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1239,8 +1134,7 @@ pub struct SyncMaxTsResponse { #[prost(string, repeated, tag = "3")] pub synced_dcs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitRegionsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1249,8 +1143,7 @@ pub struct SplitRegionsRequest { #[prost(uint64, tag = "3")] pub retry_limit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitRegionsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1259,8 +1152,7 @@ pub struct SplitRegionsResponse { #[prost(uint64, repeated, tag = "3")] pub regions_id: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitAndScatterRegionsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1271,8 +1163,7 @@ pub struct SplitAndScatterRegionsRequest { #[prost(uint64, tag = "4")] pub retry_limit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitAndScatterRegionsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1283,16 +1174,14 @@ pub struct SplitAndScatterRegionsResponse { #[prost(uint64, repeated, tag = "4")] pub regions_id: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDcLocationInfoRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(string, tag = "2")] pub dc_location: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetDcLocationInfoResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1304,8 +1193,7 @@ pub struct GetDcLocationInfoResponse { #[prost(message, optional, tag = "3")] pub max_ts: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct QueryStats { #[prost(uint64, tag = "1")] pub gc: u64, @@ -1330,8 +1218,7 @@ pub struct QueryStats { #[prost(uint64, tag = "11")] pub rollback: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportBucketsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1340,14 +1227,12 @@ pub struct ReportBucketsRequest { #[prost(message, optional, tag = "3")] pub buckets: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportBucketsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportMinResolvedTsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1356,48 +1241,41 @@ pub struct ReportMinResolvedTsRequest { #[prost(uint64, tag = "3")] pub min_resolved_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReportMinResolvedTsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SetExternalTimestampRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub timestamp: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SetExternalTimestampResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetExternalTimestampRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetExternalTimestampResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub timestamp: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMinTsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMinTsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -1417,8 +1295,8 @@ impl EventType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EventType::Put => "PUT", - EventType::Delete => "DELETE", + Self::Put => "PUT", + Self::Delete => "DELETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1454,18 +1332,18 @@ impl ErrorType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ErrorType::Ok => "OK", - ErrorType::Unknown => "UNKNOWN", - ErrorType::NotBootstrapped => "NOT_BOOTSTRAPPED", - ErrorType::StoreTombstone => "STORE_TOMBSTONE", - ErrorType::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED", - ErrorType::IncompatibleVersion => "INCOMPATIBLE_VERSION", - ErrorType::RegionNotFound => "REGION_NOT_FOUND", - ErrorType::GlobalConfigNotFound => "GLOBAL_CONFIG_NOT_FOUND", - ErrorType::DuplicatedEntry => "DUPLICATED_ENTRY", - ErrorType::EntryNotFound => "ENTRY_NOT_FOUND", - ErrorType::InvalidValue => "INVALID_VALUE", - ErrorType::DataCompacted => "DATA_COMPACTED", + Self::Ok => "OK", + Self::Unknown => "UNKNOWN", + Self::NotBootstrapped => "NOT_BOOTSTRAPPED", + Self::StoreTombstone => "STORE_TOMBSTONE", + Self::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED", + Self::IncompatibleVersion => "INCOMPATIBLE_VERSION", + Self::RegionNotFound => "REGION_NOT_FOUND", + Self::GlobalConfigNotFound => "GLOBAL_CONFIG_NOT_FOUND", + Self::DuplicatedEntry => "DUPLICATED_ENTRY", + Self::EntryNotFound => "ENTRY_NOT_FOUND", + Self::InvalidValue => "INVALID_VALUE", + Self::DataCompacted => "DATA_COMPACTED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1501,9 +1379,9 @@ impl ServiceMode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ServiceMode::UnknownSvcMode => "UNKNOWN_SVC_MODE", - ServiceMode::PdSvcMode => "PD_SVC_MODE", - ServiceMode::ApiSvcMode => "API_SVC_MODE", + Self::UnknownSvcMode => "UNKNOWN_SVC_MODE", + Self::PdSvcMode => "PD_SVC_MODE", + Self::ApiSvcMode => "API_SVC_MODE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1530,9 +1408,9 @@ impl CheckPolicy { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CheckPolicy::Scan => "SCAN", - CheckPolicy::Approximate => "APPROXIMATE", - CheckPolicy::Usekey => "USEKEY", + Self::Scan => "SCAN", + Self::Approximate => "APPROXIMATE", + Self::Usekey => "USEKEY", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1560,8 +1438,8 @@ impl ControlGrpcEvent { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ControlGrpcEvent::Pause => "PAUSE", - ControlGrpcEvent::Resume => "RESUME", + Self::Pause => "PAUSE", + Self::Resume => "RESUME", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1589,11 +1467,11 @@ impl OperatorStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - OperatorStatus::Success => "SUCCESS", - OperatorStatus::Timeout => "TIMEOUT", - OperatorStatus::Cancel => "CANCEL", - OperatorStatus::Replace => "REPLACE", - OperatorStatus::Running => "RUNNING", + Self::Success => "SUCCESS", + Self::Timeout => "TIMEOUT", + Self::Cancel => "CANCEL", + Self::Replace => "REPLACE", + Self::Running => "RUNNING", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1631,18 +1509,18 @@ impl QueryKind { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - QueryKind::Others => "Others", - QueryKind::Gc => "GC", - QueryKind::Get => "Get", - QueryKind::Scan => "Scan", - QueryKind::Coprocessor => "Coprocessor", - QueryKind::Delete => "Delete", - QueryKind::DeleteRange => "DeleteRange", - QueryKind::Put => "Put", - QueryKind::Prewrite => "Prewrite", - QueryKind::AcquirePessimisticLock => "AcquirePessimisticLock", - QueryKind::Commit => "Commit", - QueryKind::Rollback => "Rollback", + Self::Others => "Others", + Self::Gc => "GC", + Self::Get => "Get", + Self::Scan => "Scan", + Self::Coprocessor => "Coprocessor", + Self::Delete => "Delete", + Self::DeleteRange => "DeleteRange", + Self::Put => "Put", + Self::Prewrite => "Prewrite", + Self::AcquirePessimisticLock => "AcquirePessimisticLock", + Self::Commit => "Commit", + Self::Rollback => "Rollback", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1666,7 +1544,13 @@ impl QueryKind { } /// Generated client implementations. pub mod pd_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -1686,10 +1570,10 @@ pub mod pd_client { } impl PdClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -1707,14 +1591,14 @@ pub mod pd_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { PdClient::new(InterceptedService::new(inner, interceptor)) } @@ -1762,12 +1646,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetClusterInfo"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetClusterInfo")); @@ -1786,12 +1669,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetMembers"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetMembers")); @@ -1808,12 +1690,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/Tso"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "Tso")); @@ -1830,12 +1711,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/Bootstrap"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "Bootstrap")); @@ -1852,12 +1732,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/IsBootstrapped"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "IsBootstrapped")); @@ -1874,12 +1753,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/AllocID"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "AllocID")); @@ -1896,12 +1774,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/IsSnapshotRecovering", ); @@ -1921,12 +1798,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetStore"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetStore")); @@ -1943,12 +1819,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/PutStore"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "PutStore")); @@ -1965,12 +1840,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetAllStores"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetAllStores")); @@ -1987,12 +1861,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/StoreHeartbeat"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "StoreHeartbeat")); @@ -2011,12 +1884,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/RegionHeartbeat"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "RegionHeartbeat")); @@ -2033,12 +1905,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetRegion"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetRegion")); @@ -2055,12 +1926,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetPrevRegion"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetPrevRegion")); @@ -2077,12 +1947,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetRegionByID"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetRegionByID")); @@ -2099,17 +1968,17 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ScanRegions"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ScanRegions")); self.inner.unary(req, path, codec).await } + #[deprecated] pub async fn ask_split( &mut self, request: impl tonic::IntoRequest, @@ -2121,17 +1990,17 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/AskSplit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "AskSplit")); self.inner.unary(req, path, codec).await } + #[deprecated] pub async fn report_split( &mut self, request: impl tonic::IntoRequest, @@ -2143,12 +2012,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ReportSplit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ReportSplit")); @@ -2165,12 +2033,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/AskBatchSplit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "AskBatchSplit")); @@ -2187,12 +2054,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ReportBatchSplit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ReportBatchSplit")); @@ -2209,12 +2075,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetClusterConfig"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetClusterConfig")); @@ -2231,12 +2096,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/PutClusterConfig"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "PutClusterConfig")); @@ -2253,12 +2117,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ScatterRegion"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ScatterRegion")); @@ -2275,12 +2138,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetGCSafePoint"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetGCSafePoint")); @@ -2297,12 +2159,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/UpdateGCSafePoint", ); @@ -2321,12 +2182,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/UpdateServiceGCSafePoint", ); @@ -2346,12 +2206,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetGCSafePointV2"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetGCSafePointV2")); @@ -2368,12 +2227,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/WatchGCSafePointV2", ); @@ -2393,12 +2251,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/UpdateGCSafePointV2", ); @@ -2418,12 +2275,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/UpdateServiceSafePointV2", ); @@ -2443,12 +2299,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/GetAllGCSafePointV2", ); @@ -2468,12 +2323,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/SyncRegions"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "SyncRegions")); @@ -2490,12 +2344,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetOperator"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetOperator")); @@ -2512,12 +2365,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/SyncMaxTS"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "SyncMaxTS")); @@ -2534,12 +2386,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/SplitRegions"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "SplitRegions")); @@ -2556,12 +2407,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/SplitAndScatterRegions", ); @@ -2581,12 +2431,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/GetDCLocationInfo", ); @@ -2605,12 +2454,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/StoreGlobalConfig", ); @@ -2629,12 +2477,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/LoadGlobalConfig"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "LoadGlobalConfig")); @@ -2651,12 +2498,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/WatchGlobalConfig", ); @@ -2677,12 +2523,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ReportBuckets"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ReportBuckets")); @@ -2699,12 +2544,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/ReportMinResolvedTS", ); @@ -2724,12 +2568,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/SetExternalTimestamp", ); @@ -2749,12 +2592,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/pdpb.PD/GetExternalTimestamp", ); @@ -2777,12 +2619,11 @@ pub mod pd_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetMinTS"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetMinTS")); diff --git a/src/generated/raft_cmdpb.rs b/src/generated/raft_cmdpb.rs index eb178070..8e369981 100644 --- a/src/generated/raft_cmdpb.rs +++ b/src/generated/raft_cmdpb.rs @@ -1,20 +1,17 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetRequest { #[prost(string, tag = "1")] pub cf: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "2")] pub key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetResponse { #[prost(bytes = "vec", tag = "1")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutRequest { #[prost(string, tag = "1")] pub cf: ::prost::alloc::string::String, @@ -23,22 +20,18 @@ pub struct PutRequest { #[prost(bytes = "vec", tag = "3")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteRequest { #[prost(string, tag = "1")] pub cf: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "2")] pub key: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteRangeRequest { #[prost(string, tag = "1")] pub cf: ::prost::alloc::string::String, @@ -49,20 +42,16 @@ pub struct DeleteRangeRequest { #[prost(bool, tag = "4")] pub notify_only: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteRangeResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SnapRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapResponse { #[prost(message, optional, tag = "1")] pub region: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrewriteRequest { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, @@ -71,19 +60,15 @@ pub struct PrewriteRequest { #[prost(bytes = "vec", tag = "3")] pub lock: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrewriteResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IngestSstRequest { #[prost(message, optional, tag = "1")] pub sst: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct IngestSstResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadIndexRequest { /// In replica read, leader uses start_ts and key_ranges to check memory locks. @@ -92,8 +77,7 @@ pub struct ReadIndexRequest { #[prost(message, repeated, tag = "2")] pub key_ranges: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReadIndexResponse { #[prost(uint64, tag = "1")] pub read_index: u64, @@ -101,7 +85,6 @@ pub struct ReadIndexResponse { #[prost(message, optional, tag = "2")] pub locked: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { #[prost(enumeration = "CmdType", tag = "1")] @@ -123,7 +106,6 @@ pub struct Request { #[prost(message, optional, tag = "10")] pub read_index: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { #[prost(enumeration = "CmdType", tag = "1")] @@ -145,8 +127,7 @@ pub struct Response { #[prost(message, optional, tag = "10")] pub read_index: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ChangePeerRequest { /// This can be only called in internal RaftStore now. #[prost(enumeration = "super::eraftpb::ConfChangeType", tag = "1")] @@ -154,26 +135,22 @@ pub struct ChangePeerRequest { #[prost(message, optional, tag = "2")] pub peer: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeerResponse { #[prost(message, optional, tag = "1")] pub region: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeerV2Request { #[prost(message, repeated, tag = "1")] pub changes: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangePeerV2Response { #[prost(message, optional, tag = "1")] pub region: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitRequest { /// This can be only called in internal RaftStore now. /// The split_key must be in the been splitting region. @@ -200,7 +177,6 @@ pub struct SplitRequest { #[prost(bool, tag = "5")] pub share_source_region_size: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SplitResponse { #[prost(message, optional, tag = "1")] @@ -208,7 +184,6 @@ pub struct SplitResponse { #[prost(message, optional, tag = "2")] pub right: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchSplitRequest { #[prost(message, repeated, tag = "1")] @@ -224,14 +199,12 @@ pub struct BatchSplitRequest { #[prost(bool, tag = "3")] pub share_source_region_size: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchSplitResponse { #[prost(message, repeated, tag = "1")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactLogRequest { #[prost(uint64, tag = "1")] pub compact_index: u64, @@ -240,10 +213,8 @@ pub struct CompactLogRequest { #[prost(uint64, tag = "3")] pub voter_replicated_index: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CompactLogResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransferLeaderRequest { #[prost(message, optional, tag = "1")] @@ -251,17 +222,14 @@ pub struct TransferLeaderRequest { #[prost(message, repeated, tag = "2")] pub peers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TransferLeaderResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ComputeHashRequest { #[prost(bytes = "vec", tag = "1")] pub context: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct VerifyHashRequest { #[prost(uint64, tag = "1")] pub index: u64, @@ -270,10 +238,8 @@ pub struct VerifyHashRequest { #[prost(bytes = "vec", tag = "3")] pub context: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct VerifyHashResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PrepareMergeRequest { #[prost(uint64, tag = "1")] @@ -281,26 +247,20 @@ pub struct PrepareMergeRequest { #[prost(message, optional, tag = "2")] pub target: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrepareMergeResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrepareFlashbackRequest { /// The start_ts that the current flashback progress is using. #[prost(uint64, tag = "1")] pub start_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct PrepareFlashbackResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct FinishFlashbackRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct FinishFlashbackResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CommitMergeRequest { #[prost(message, optional, tag = "1")] @@ -313,42 +273,34 @@ pub struct CommitMergeRequest { #[prost(message, optional, tag = "4")] pub source_state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommitMergeResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RollbackMergeRequest { #[prost(uint64, tag = "1")] pub commit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RollbackMergeResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SwitchWitnessRequest { #[prost(uint64, tag = "1")] pub peer_id: u64, #[prost(bool, tag = "2")] pub is_witness: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchSwitchWitnessRequest { #[prost(message, repeated, tag = "1")] pub switch_witnesses: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct BatchSwitchWitnessResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct UpdateGcPeerRequest { #[prost(uint64, repeated, tag = "1")] pub peer_id: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AdminRequest { #[prost(enumeration = "AdminCmdType", tag = "1")] @@ -385,7 +337,6 @@ pub struct AdminRequest { #[prost(message, optional, tag = "16")] pub update_gc_peers: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AdminResponse { #[prost(enumeration = "AdminCmdType", tag = "1")] @@ -420,11 +371,9 @@ pub struct AdminResponse { pub switch_witnesses: ::core::option::Option, } /// For get the leader of the region. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionLeaderRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionLeaderResponse { #[prost(message, optional, tag = "1")] pub leader: ::core::option::Option, @@ -438,10 +387,8 @@ pub struct RegionLeaderResponse { /// E,g, for ChangePeer, if we add Peer10 into region1 and find region1 has already had /// Peer10, we can think this ChangePeer is finished, and can pop this job from job list /// directly. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionDetailRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionDetailResponse { #[prost(message, optional, tag = "1")] @@ -449,8 +396,7 @@ pub struct RegionDetailResponse { #[prost(message, optional, tag = "2")] pub leader: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StatusRequest { #[prost(enumeration = "StatusCmdType", tag = "1")] pub cmd_type: i32, @@ -459,7 +405,6 @@ pub struct StatusRequest { #[prost(message, optional, tag = "3")] pub region_detail: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StatusResponse { #[prost(enumeration = "StatusCmdType", tag = "1")] @@ -469,8 +414,7 @@ pub struct StatusResponse { #[prost(message, optional, tag = "3")] pub region_detail: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftRequestHeader { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -503,7 +447,6 @@ pub struct RaftRequestHeader { #[prost(string, tag = "13")] pub resource_group_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftResponseHeader { #[prost(message, optional, tag = "1")] @@ -513,7 +456,6 @@ pub struct RaftResponseHeader { #[prost(uint64, tag = "3")] pub current_term: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftCmdRequest { #[prost(message, optional, tag = "1")] @@ -527,7 +469,6 @@ pub struct RaftCmdRequest { #[prost(message, optional, tag = "4")] pub status_request: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftCmdResponse { #[prost(message, optional, tag = "1")] @@ -559,15 +500,15 @@ impl CmdType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CmdType::Invalid => "Invalid", - CmdType::Get => "Get", - CmdType::Put => "Put", - CmdType::Delete => "Delete", - CmdType::Snap => "Snap", - CmdType::Prewrite => "Prewrite", - CmdType::DeleteRange => "DeleteRange", - CmdType::IngestSst => "IngestSST", - CmdType::ReadIndex => "ReadIndex", + Self::Invalid => "Invalid", + Self::Get => "Get", + Self::Put => "Put", + Self::Delete => "Delete", + Self::Snap => "Snap", + Self::Prewrite => "Prewrite", + Self::DeleteRange => "DeleteRange", + Self::IngestSst => "IngestSST", + Self::ReadIndex => "ReadIndex", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -592,6 +533,7 @@ pub enum AdminCmdType { InvalidAdmin = 0, ChangePeer = 1, /// Use `BatchSplit` instead. + #[deprecated] Split = 2, CompactLog = 3, TransferLeader = 4, @@ -615,22 +557,23 @@ impl AdminCmdType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - AdminCmdType::InvalidAdmin => "InvalidAdmin", - AdminCmdType::ChangePeer => "ChangePeer", - AdminCmdType::Split => "Split", - AdminCmdType::CompactLog => "CompactLog", - AdminCmdType::TransferLeader => "TransferLeader", - AdminCmdType::ComputeHash => "ComputeHash", - AdminCmdType::VerifyHash => "VerifyHash", - AdminCmdType::PrepareMerge => "PrepareMerge", - AdminCmdType::CommitMerge => "CommitMerge", - AdminCmdType::RollbackMerge => "RollbackMerge", - AdminCmdType::BatchSplit => "BatchSplit", - AdminCmdType::ChangePeerV2 => "ChangePeerV2", - AdminCmdType::PrepareFlashback => "PrepareFlashback", - AdminCmdType::FinishFlashback => "FinishFlashback", - AdminCmdType::BatchSwitchWitness => "BatchSwitchWitness", - AdminCmdType::UpdateGcPeer => "UpdateGcPeer", + Self::InvalidAdmin => "InvalidAdmin", + Self::ChangePeer => "ChangePeer", + #[allow(deprecated)] + Self::Split => "Split", + Self::CompactLog => "CompactLog", + Self::TransferLeader => "TransferLeader", + Self::ComputeHash => "ComputeHash", + Self::VerifyHash => "VerifyHash", + Self::PrepareMerge => "PrepareMerge", + Self::CommitMerge => "CommitMerge", + Self::RollbackMerge => "RollbackMerge", + Self::BatchSplit => "BatchSplit", + Self::ChangePeerV2 => "ChangePeerV2", + Self::PrepareFlashback => "PrepareFlashback", + Self::FinishFlashback => "FinishFlashback", + Self::BatchSwitchWitness => "BatchSwitchWitness", + Self::UpdateGcPeer => "UpdateGcPeer", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -638,7 +581,7 @@ impl AdminCmdType { match value { "InvalidAdmin" => Some(Self::InvalidAdmin), "ChangePeer" => Some(Self::ChangePeer), - "Split" => Some(Self::Split), + "Split" => Some(#[allow(deprecated)] Self::Split), "CompactLog" => Some(Self::CompactLog), "TransferLeader" => Some(Self::TransferLeader), "ComputeHash" => Some(Self::ComputeHash), @@ -670,9 +613,9 @@ impl StatusCmdType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StatusCmdType::InvalidStatus => "InvalidStatus", - StatusCmdType::RegionLeader => "RegionLeader", - StatusCmdType::RegionDetail => "RegionDetail", + Self::InvalidStatus => "InvalidStatus", + Self::RegionLeader => "RegionLeader", + Self::RegionDetail => "RegionDetail", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/raft_serverpb.rs b/src/generated/raft_serverpb.rs index f6b1f942..152b3974 100644 --- a/src/generated/raft_serverpb.rs +++ b/src/generated/raft_serverpb.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftMessage { #[prost(uint64, tag = "1")] @@ -30,16 +29,14 @@ pub struct RaftMessage { #[prost(enumeration = "super::disk_usage::DiskUsage", tag = "12")] pub disk_usage: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftTruncatedState { #[prost(uint64, tag = "1")] pub index: u64, #[prost(uint64, tag = "2")] pub term: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SnapshotCfFile { #[prost(string, tag = "1")] pub cf: ::prost::alloc::string::String, @@ -48,7 +45,6 @@ pub struct SnapshotCfFile { #[prost(uint32, tag = "3")] pub checksum: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotMeta { #[prost(message, repeated, tag = "1")] @@ -75,7 +71,6 @@ pub struct SnapshotMeta { #[prost(uint64, tag = "7")] pub commit_index_hint: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotChunk { #[prost(message, optional, tag = "1")] @@ -83,11 +78,9 @@ pub struct SnapshotChunk { #[prost(bytes = "vec", tag = "2")] pub data: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Done {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TabletSnapshotFileMeta { #[prost(uint64, tag = "1")] pub file_size: u64, @@ -104,7 +97,6 @@ pub struct TabletSnapshotFileMeta { /// Server should send back an `AcceptedSnapshotFile` to let client /// keep sending specified files. Only SST files can be skipped, all /// other files should always be sent. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TabletSnapshotPreview { #[prost(message, repeated, tag = "1")] @@ -114,8 +106,7 @@ pub struct TabletSnapshotPreview { #[prost(bool, tag = "2")] pub end: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TabletSnapshotFileChunk { #[prost(uint64, tag = "1")] pub file_size: u64, @@ -130,7 +121,6 @@ pub struct TabletSnapshotFileChunk { #[prost(message, optional, tag = "5")] pub key: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TabletSnapshotHead { #[prost(message, optional, tag = "1")] @@ -138,15 +128,13 @@ pub struct TabletSnapshotHead { #[prost(bool, tag = "2")] pub use_cache: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TabletSnapshotEnd { /// Checksum of all data sent in `TabletSnapshotFileChunk.data` and /// `TabletSnapshotFileChunk.file_name`. #[prost(uint64, tag = "1")] pub checksum: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TabletSnapshotRequest { #[prost(oneof = "tablet_snapshot_request::Payload", tags = "1, 2, 3, 4")] @@ -154,7 +142,6 @@ pub struct TabletSnapshotRequest { } /// Nested message and enum types in `TabletSnapshotRequest`. pub mod tablet_snapshot_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { #[prost(message, tag = "1")] @@ -167,27 +154,23 @@ pub mod tablet_snapshot_request { End(super::TabletSnapshotEnd), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AcceptedSnapshotFiles { #[prost(string, repeated, tag = "1")] pub file_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TabletSnapshotResponse { #[prost(message, optional, tag = "1")] pub files: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeyValue { #[prost(bytes = "vec", tag = "1")] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] pub value: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaftSnapshotData { #[prost(message, optional, tag = "1")] @@ -205,8 +188,7 @@ pub struct RaftSnapshotData { #[prost(message, repeated, tag = "7")] pub merged_records: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreIdent { #[prost(uint64, tag = "1")] pub cluster_id: u64, @@ -215,8 +197,7 @@ pub struct StoreIdent { #[prost(enumeration = "super::kvrpcpb::ApiVersion", tag = "3")] pub api_version: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreRecoverState { /// Used for TiKV start recovery when WAL of KVDB was disabled. /// TiKV may read all relations between seqno and raft log index, and replay @@ -226,16 +207,14 @@ pub struct StoreRecoverState { #[prost(uint64, tag = "1")] pub seqno: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftLocalState { #[prost(message, optional, tag = "1")] pub hard_state: ::core::option::Option, #[prost(uint64, tag = "2")] pub last_index: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RaftApplyState { #[prost(uint64, tag = "1")] pub applied_index: u64, @@ -248,7 +227,6 @@ pub struct RaftApplyState { #[prost(message, optional, tag = "2")] pub truncated_state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MergeState { #[prost(uint64, tag = "1")] @@ -258,7 +236,6 @@ pub struct MergeState { #[prost(uint64, tag = "3")] pub commit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MergedRecord { #[prost(uint64, tag = "1")] @@ -284,7 +261,6 @@ pub struct MergedRecord { #[prost(uint64, tag = "8")] pub source_index: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionLocalState { #[prost(enumeration = "PeerState", tag = "1")] @@ -307,7 +283,6 @@ pub struct RegionLocalState { #[prost(message, repeated, tag = "6")] pub merged_records: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionSequenceNumberRelation { #[prost(uint64, tag = "1")] @@ -319,8 +294,7 @@ pub struct RegionSequenceNumberRelation { #[prost(message, optional, tag = "4")] pub region_state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct AvailabilityContext { #[prost(uint64, tag = "1")] pub from_region_id: u64, @@ -331,14 +305,12 @@ pub struct AvailabilityContext { #[prost(bool, tag = "4")] pub trimmed: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct FlushMemtable { #[prost(uint64, tag = "1")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RefreshBuckets { #[prost(uint64, tag = "1")] pub version: u64, @@ -347,8 +319,7 @@ pub struct RefreshBuckets { #[prost(uint64, repeated, tag = "3")] pub sizes: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CheckGcPeer { /// The region ID who triggers the check and wait for report. It should be /// the ID of RaftMessage.from. @@ -364,7 +335,6 @@ pub struct CheckGcPeer { #[prost(message, optional, tag = "4")] pub check_peer: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExtraMessage { #[prost(enumeration = "ExtraMessageType", tag = "1")] @@ -413,11 +383,11 @@ impl PeerState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - PeerState::Normal => "Normal", - PeerState::Applying => "Applying", - PeerState::Tombstone => "Tombstone", - PeerState::Merging => "Merging", - PeerState::Unavailable => "Unavailable", + Self::Normal => "Normal", + Self::Applying => "Applying", + Self::Tombstone => "Tombstone", + Self::Merging => "Merging", + Self::Unavailable => "Unavailable", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -461,27 +431,23 @@ impl ExtraMessageType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ExtraMessageType::MsgRegionWakeUp => "MsgRegionWakeUp", - ExtraMessageType::MsgWantRollbackMerge => "MsgWantRollbackMerge", - ExtraMessageType::MsgCheckStalePeer => "MsgCheckStalePeer", - ExtraMessageType::MsgCheckStalePeerResponse => "MsgCheckStalePeerResponse", - ExtraMessageType::MsgHibernateRequest => "MsgHibernateRequest", - ExtraMessageType::MsgHibernateResponse => "MsgHibernateResponse", - ExtraMessageType::MsgRejectRaftLogCausedByMemoryUsage => { + Self::MsgRegionWakeUp => "MsgRegionWakeUp", + Self::MsgWantRollbackMerge => "MsgWantRollbackMerge", + Self::MsgCheckStalePeer => "MsgCheckStalePeer", + Self::MsgCheckStalePeerResponse => "MsgCheckStalePeerResponse", + Self::MsgHibernateRequest => "MsgHibernateRequest", + Self::MsgHibernateResponse => "MsgHibernateResponse", + Self::MsgRejectRaftLogCausedByMemoryUsage => { "MsgRejectRaftLogCausedByMemoryUsage" } - ExtraMessageType::MsgAvailabilityRequest => "MsgAvailabilityRequest", - ExtraMessageType::MsgAvailabilityResponse => "MsgAvailabilityResponse", - ExtraMessageType::MsgVoterReplicatedIndexRequest => { - "MsgVoterReplicatedIndexRequest" - } - ExtraMessageType::MsgVoterReplicatedIndexResponse => { - "MsgVoterReplicatedIndexResponse" - } - ExtraMessageType::MsgGcPeerRequest => "MsgGcPeerRequest", - ExtraMessageType::MsgGcPeerResponse => "MsgGcPeerResponse", - ExtraMessageType::MsgFlushMemtable => "MsgFlushMemtable", - ExtraMessageType::MsgRefreshBuckets => "MsgRefreshBuckets", + Self::MsgAvailabilityRequest => "MsgAvailabilityRequest", + Self::MsgAvailabilityResponse => "MsgAvailabilityResponse", + Self::MsgVoterReplicatedIndexRequest => "MsgVoterReplicatedIndexRequest", + Self::MsgVoterReplicatedIndexResponse => "MsgVoterReplicatedIndexResponse", + Self::MsgGcPeerRequest => "MsgGcPeerRequest", + Self::MsgGcPeerResponse => "MsgGcPeerResponse", + Self::MsgFlushMemtable => "MsgFlushMemtable", + Self::MsgRefreshBuckets => "MsgRefreshBuckets", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/recover_data.rs b/src/generated/recover_data.rs index 3b7adb0f..178413b2 100644 --- a/src/generated/recover_data.rs +++ b/src/generated/recover_data.rs @@ -1,19 +1,16 @@ // This file is @generated by prost-build. /// request to read region meata from a store -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReadRegionMetaRequest { #[prost(uint64, tag = "1")] pub store_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(string, tag = "1")] pub msg: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionMeta { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -36,8 +33,7 @@ pub struct RegionMeta { pub end_key: ::prost::alloc::vec::Vec, } /// command to store for recover region -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecoverRegionRequest { #[prost(uint64, tag = "1")] pub region_id: u64, @@ -48,8 +44,7 @@ pub struct RecoverRegionRequest { #[prost(bool, tag = "3")] pub tombstone: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RecoverRegionResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, @@ -57,27 +52,23 @@ pub struct RecoverRegionResponse { pub store_id: u64, } /// wait apply to last index -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct WaitApplyRequest { #[prost(uint64, tag = "1")] pub store_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WaitApplyResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, } /// resolve data by resolved_ts -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResolveKvDataRequest { #[prost(uint64, tag = "1")] pub resolved_ts: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResolveKvDataResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, @@ -93,7 +84,13 @@ pub struct ResolveKvDataResponse { } /// Generated client implementations. pub mod recover_data_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// a recovery workflow likes @@ -119,10 +116,10 @@ pub mod recover_data_client { } impl RecoverDataClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -140,14 +137,14 @@ pub mod recover_data_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { RecoverDataClient::new(InterceptedService::new(inner, interceptor)) } @@ -194,12 +191,11 @@ pub mod recover_data_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/recover_data.RecoverData/ReadRegionMeta", ); @@ -222,12 +218,11 @@ pub mod recover_data_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/recover_data.RecoverData/RecoverRegion", ); @@ -248,12 +243,11 @@ pub mod recover_data_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/recover_data.RecoverData/WaitApply", ); @@ -274,12 +268,11 @@ pub mod recover_data_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/recover_data.RecoverData/ResolveKvData", ); diff --git a/src/generated/replication_modepb.rs b/src/generated/replication_modepb.rs index 3140fab5..5f451998 100644 --- a/src/generated/replication_modepb.rs +++ b/src/generated/replication_modepb.rs @@ -1,7 +1,6 @@ // This file is @generated by prost-build. /// The replication status sync from PD to TiKV. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ReplicationStatus { #[prost(enumeration = "ReplicationMode", tag = "1")] pub mode: i32, @@ -9,8 +8,7 @@ pub struct ReplicationStatus { pub dr_auto_sync: ::core::option::Option, } /// The status of dr-autosync mode. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DrAutoSync { /// The key of the label that used for distinguish different DC. #[prost(string, tag = "1")] @@ -31,8 +29,7 @@ pub struct DrAutoSync { pub pause_region_split: bool, } /// The replication status sync from TiKV to PD. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RegionReplicationStatus { #[prost(enumeration = "RegionReplicationState", tag = "1")] pub state: i32, @@ -40,8 +37,7 @@ pub struct RegionReplicationStatus { #[prost(uint64, tag = "2")] pub state_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreDrAutoSyncStatus { #[prost(enumeration = "DrAutoSyncState", tag = "1")] pub state: i32, @@ -63,8 +59,8 @@ impl ReplicationMode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ReplicationMode::Majority => "MAJORITY", - ReplicationMode::DrAutoSync => "DR_AUTO_SYNC", + Self::Majority => "MAJORITY", + Self::DrAutoSync => "DR_AUTO_SYNC", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -95,10 +91,10 @@ impl DrAutoSyncState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - DrAutoSyncState::Sync => "SYNC", - DrAutoSyncState::AsyncWait => "ASYNC_WAIT", - DrAutoSyncState::Async => "ASYNC", - DrAutoSyncState::SyncRecover => "SYNC_RECOVER", + Self::Sync => "SYNC", + Self::AsyncWait => "ASYNC_WAIT", + Self::Async => "ASYNC", + Self::SyncRecover => "SYNC_RECOVER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -129,9 +125,9 @@ impl RegionReplicationState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - RegionReplicationState::Unknown => "UNKNOWN", - RegionReplicationState::SimpleMajority => "SIMPLE_MAJORITY", - RegionReplicationState::IntegrityOverLabel => "INTEGRITY_OVER_LABEL", + Self::Unknown => "UNKNOWN", + Self::SimpleMajority => "SIMPLE_MAJORITY", + Self::IntegrityOverLabel => "INTEGRITY_OVER_LABEL", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/src/generated/resource_manager.rs b/src/generated/resource_manager.rs index caf4b116..44f82aa3 100644 --- a/src/generated/resource_manager.rs +++ b/src/generated/resource_manager.rs @@ -1,8 +1,6 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ListResourceGroupsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListResourceGroupsResponse { #[prost(message, optional, tag = "1")] @@ -10,13 +8,11 @@ pub struct ListResourceGroupsResponse { #[prost(message, repeated, tag = "2")] pub groups: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetResourceGroupRequest { #[prost(string, tag = "1")] pub resource_group_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResourceGroupResponse { #[prost(message, optional, tag = "1")] @@ -24,35 +20,30 @@ pub struct GetResourceGroupResponse { #[prost(message, optional, tag = "2")] pub group: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteResourceGroupRequest { #[prost(string, tag = "1")] pub resource_group_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DeleteResourceGroupResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, #[prost(string, tag = "2")] pub body: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PutResourceGroupRequest { #[prost(message, optional, tag = "1")] pub group: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PutResourceGroupResponse { #[prost(message, optional, tag = "1")] pub error: ::core::option::Option, #[prost(string, tag = "2")] pub body: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TokenBucketsRequest { #[prost(message, repeated, tag = "1")] @@ -62,7 +53,6 @@ pub struct TokenBucketsRequest { #[prost(uint64, tag = "3")] pub client_unique_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TokenBucketRequest { #[prost(string, tag = "1")] @@ -80,19 +70,16 @@ pub struct TokenBucketRequest { } /// Nested message and enum types in `TokenBucketRequest`. pub mod token_bucket_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestRu { #[prost(message, repeated, tag = "1")] pub request_r_u: ::prost::alloc::vec::Vec, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestRawResource { #[prost(message, repeated, tag = "1")] pub request_raw_resource: ::prost::alloc::vec::Vec, } - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Request { /// RU mode, group settings with WRU/RRU etc resource abstract unit. @@ -103,7 +90,6 @@ pub mod token_bucket_request { RawResourceItems(RequestRawResource), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TokenBucketsResponse { #[prost(message, optional, tag = "1")] @@ -111,7 +97,6 @@ pub struct TokenBucketsResponse { #[prost(message, repeated, tag = "2")] pub responses: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TokenBucketResponse { #[prost(string, tag = "1")] @@ -123,8 +108,7 @@ pub struct TokenBucketResponse { #[prost(message, repeated, tag = "3")] pub granted_resource_tokens: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GrantedRuTokenBucket { #[prost(enumeration = "RequestUnitType", tag = "1")] pub r#type: i32, @@ -133,8 +117,7 @@ pub struct GrantedRuTokenBucket { #[prost(int64, tag = "3")] pub trickle_time_ms: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GrantedRawResourceTokenBucket { #[prost(enumeration = "RawResourceType", tag = "1")] pub r#type: i32, @@ -143,8 +126,7 @@ pub struct GrantedRawResourceTokenBucket { #[prost(int64, tag = "3")] pub trickle_time_ms: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Consumption { #[prost(double, tag = "1")] pub r_r_u: f64, @@ -163,16 +145,14 @@ pub struct Consumption { #[prost(double, tag = "8")] pub kv_write_rpc_count: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RequestUnitItem { #[prost(enumeration = "RequestUnitType", tag = "1")] pub r#type: i32, #[prost(double, tag = "2")] pub value: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RawResourceItem { #[prost(enumeration = "RawResourceType", tag = "1")] pub r#type: i32, @@ -180,7 +160,6 @@ pub struct RawResourceItem { pub value: f64, } /// ResourceGroup the settings definitions. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceGroup { #[prost(string, tag = "1")] @@ -202,14 +181,12 @@ pub struct ResourceGroup { #[prost(message, optional, tag = "7")] pub background_settings: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GroupRequestUnitSettings { #[prost(message, optional, tag = "1")] pub r_u: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GroupRawResourceSettings { #[prost(message, optional, tag = "1")] pub cpu: ::core::option::Option, @@ -218,8 +195,7 @@ pub struct GroupRawResourceSettings { #[prost(message, optional, tag = "3")] pub io_write: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TokenBucket { #[prost(message, optional, tag = "1")] pub settings: ::core::option::Option, @@ -227,8 +203,7 @@ pub struct TokenBucket { #[prost(double, tag = "2")] pub tokens: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TokenLimitSettings { #[prost(uint64, tag = "1")] pub fill_rate: u64, @@ -237,20 +212,17 @@ pub struct TokenLimitSettings { #[prost(double, tag = "3")] pub max_tokens: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(string, tag = "1")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RunawayRule { #[prost(uint64, tag = "1")] pub exec_elapsed_time_ms: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RunawayWatch { /// how long would the watch last #[prost(int64, tag = "1")] @@ -258,8 +230,7 @@ pub struct RunawayWatch { #[prost(enumeration = "RunawayWatchType", tag = "2")] pub r#type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RunawaySettings { #[prost(message, optional, tag = "1")] pub rule: ::core::option::Option, @@ -268,14 +239,12 @@ pub struct RunawaySettings { #[prost(message, optional, tag = "3")] pub watch: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct BackgroundSettings { #[prost(string, repeated, tag = "1")] pub job_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Participant { /// name is the unique name of the resource manager participant. #[prost(string, tag = "1")] @@ -300,7 +269,7 @@ impl RequestUnitType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - RequestUnitType::Ru => "RU", + Self::Ru => "RU", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -325,9 +294,9 @@ impl RawResourceType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - RawResourceType::Cpu => "CPU", - RawResourceType::IoReadFlow => "IOReadFlow", - RawResourceType::IoWriteFlow => "IOWriteFlow", + Self::Cpu => "CPU", + Self::IoReadFlow => "IOReadFlow", + Self::IoWriteFlow => "IOWriteFlow", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -354,9 +323,9 @@ impl GroupMode { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - GroupMode::Unknown => "Unknown", - GroupMode::RuMode => "RUMode", - GroupMode::RawMode => "RawMode", + Self::Unknown => "Unknown", + Self::RuMode => "RUMode", + Self::RawMode => "RawMode", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -387,10 +356,10 @@ impl RunawayAction { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - RunawayAction::NoneAction => "NoneAction", - RunawayAction::DryRun => "DryRun", - RunawayAction::CoolDown => "CoolDown", - RunawayAction::Kill => "Kill", + Self::NoneAction => "NoneAction", + Self::DryRun => "DryRun", + Self::CoolDown => "CoolDown", + Self::Kill => "Kill", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -419,10 +388,10 @@ impl RunawayWatchType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - RunawayWatchType::NoneWatch => "NoneWatch", - RunawayWatchType::Exact => "Exact", - RunawayWatchType::Similar => "Similar", - RunawayWatchType::Plan => "Plan", + Self::NoneWatch => "NoneWatch", + Self::Exact => "Exact", + Self::Similar => "Similar", + Self::Plan => "Plan", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -438,7 +407,13 @@ impl RunawayWatchType { } /// Generated client implementations. pub mod resource_manager_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -458,10 +433,10 @@ pub mod resource_manager_client { } impl ResourceManagerClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -479,14 +454,14 @@ pub mod resource_manager_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ResourceManagerClient::new(InterceptedService::new(inner, interceptor)) } @@ -532,12 +507,11 @@ pub mod resource_manager_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_manager.ResourceManager/ListResourceGroups", ); @@ -562,12 +536,11 @@ pub mod resource_manager_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_manager.ResourceManager/GetResourceGroup", ); @@ -592,12 +565,11 @@ pub mod resource_manager_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_manager.ResourceManager/AddResourceGroup", ); @@ -622,12 +594,11 @@ pub mod resource_manager_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_manager.ResourceManager/ModifyResourceGroup", ); @@ -652,12 +623,11 @@ pub mod resource_manager_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_manager.ResourceManager/DeleteResourceGroup", ); @@ -684,12 +654,11 @@ pub mod resource_manager_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_manager.ResourceManager/AcquireTokenBuckets", ); diff --git a/src/generated/resource_usage_agent.rs b/src/generated/resource_usage_agent.rs index a8f7f5fd..494815eb 100644 --- a/src/generated/resource_usage_agent.rs +++ b/src/generated/resource_usage_agent.rs @@ -1,11 +1,8 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResourceMeteringRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct EmptyResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceUsageRecord { #[prost(oneof = "resource_usage_record::RecordOneof", tags = "1")] @@ -13,7 +10,6 @@ pub struct ResourceUsageRecord { } /// Nested message and enum types in `ResourceUsageRecord`. pub mod resource_usage_record { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum RecordOneof { #[prost(message, tag = "1")] @@ -21,7 +17,6 @@ pub mod resource_usage_record { } } /// GroupTagRecord is a set of resource usage data grouped by resource_group_tag. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupTagRecord { #[prost(bytes = "vec", tag = "1")] @@ -29,8 +24,7 @@ pub struct GroupTagRecord { #[prost(message, repeated, tag = "2")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GroupTagRecordItem { #[prost(uint64, tag = "1")] pub timestamp_sec: u64, @@ -43,7 +37,13 @@ pub struct GroupTagRecordItem { } /// Generated client implementations. pub mod resource_usage_agent_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// ResourceUsageAgent is the service for storing resource usage records. @@ -64,10 +64,10 @@ pub mod resource_usage_agent_client { } impl ResourceUsageAgentClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -85,14 +85,14 @@ pub mod resource_usage_agent_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ResourceUsageAgentClient::new(InterceptedService::new(inner, interceptor)) } @@ -139,12 +139,11 @@ pub mod resource_usage_agent_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_usage_agent.ResourceUsageAgent/Report", ); @@ -159,7 +158,13 @@ pub mod resource_usage_agent_client { } /// Generated client implementations. pub mod resource_metering_pub_sub_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// TiKV implements ResourceMeteringPubSub service for clients to subscribe to resource metering records. @@ -180,10 +185,10 @@ pub mod resource_metering_pub_sub_client { } impl ResourceMeteringPubSubClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -201,14 +206,14 @@ pub mod resource_metering_pub_sub_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { ResourceMeteringPubSubClient::new( InterceptedService::new(inner, interceptor), @@ -258,12 +263,11 @@ pub mod resource_metering_pub_sub_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/resource_usage_agent.ResourceMeteringPubSub/Subscribe", ); diff --git a/src/generated/schedulingpb.rs b/src/generated/schedulingpb.rs index 5c6d5de3..137b86c8 100644 --- a/src/generated/schedulingpb.rs +++ b/src/generated/schedulingpb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RequestHeader { /// cluster_id is the ID of the cluster which be sent to. #[prost(uint64, tag = "1")] @@ -9,8 +8,7 @@ pub struct RequestHeader { #[prost(uint64, tag = "2")] pub sender_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResponseHeader { /// cluster_id is the ID of the cluster which sent the response. #[prost(uint64, tag = "1")] @@ -18,16 +16,14 @@ pub struct ResponseHeader { #[prost(message, optional, tag = "2")] pub error: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(enumeration = "ErrorType", tag = "1")] pub r#type: i32, #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Participant { /// name is the unique name of the scheduling participant. #[prost(string, tag = "1")] @@ -40,7 +36,6 @@ pub struct Participant { #[prost(string, repeated, tag = "3")] pub listen_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StoreHeartbeatRequest { #[prost(message, optional, tag = "1")] @@ -48,15 +43,13 @@ pub struct StoreHeartbeatRequest { #[prost(message, optional, tag = "2")] pub stats: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StoreHeartbeatResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(string, tag = "2")] pub cluster_version: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionHeartbeatRequest { #[prost(message, optional, tag = "1")] @@ -99,7 +92,6 @@ pub struct RegionHeartbeatRequest { #[prost(message, optional, tag = "14")] pub interval: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionHeartbeatResponse { #[prost(message, optional, tag = "1")] @@ -148,8 +140,7 @@ pub struct RegionHeartbeatResponse { #[prost(message, optional, tag = "10")] pub switch_witnesses: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScatterRegionsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -165,16 +156,14 @@ pub struct ScatterRegionsRequest { #[prost(bool, tag = "5")] pub skip_store_limit: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ScatterRegionsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub finished_percentage: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitRegionsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -183,8 +172,7 @@ pub struct SplitRegionsRequest { #[prost(uint64, tag = "3")] pub retry_limit: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitRegionsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -193,16 +181,14 @@ pub struct SplitRegionsResponse { #[prost(uint64, repeated, tag = "3")] pub regions_id: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOperatorRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint64, tag = "2")] pub region_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetOperatorResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -215,7 +201,6 @@ pub struct GetOperatorResponse { #[prost(bytes = "vec", tag = "5")] pub kind: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskBatchSplitRequest { #[prost(message, optional, tag = "1")] @@ -225,7 +210,6 @@ pub struct AskBatchSplitRequest { #[prost(uint32, tag = "3")] pub split_count: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AskBatchSplitResponse { #[prost(message, optional, tag = "1")] @@ -250,12 +234,12 @@ impl ErrorType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ErrorType::Ok => "OK", - ErrorType::Unknown => "UNKNOWN", - ErrorType::NotBootstrapped => "NOT_BOOTSTRAPPED", - ErrorType::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED", - ErrorType::InvalidValue => "INVALID_VALUE", - ErrorType::ClusterMismatched => "CLUSTER_MISMATCHED", + Self::Ok => "OK", + Self::Unknown => "UNKNOWN", + Self::NotBootstrapped => "NOT_BOOTSTRAPPED", + Self::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED", + Self::InvalidValue => "INVALID_VALUE", + Self::ClusterMismatched => "CLUSTER_MISMATCHED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -273,7 +257,13 @@ impl ErrorType { } /// Generated client implementations. pub mod scheduling_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -293,10 +283,10 @@ pub mod scheduling_client { } impl SchedulingClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -314,14 +304,14 @@ pub mod scheduling_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { SchedulingClient::new(InterceptedService::new(inner, interceptor)) } @@ -367,12 +357,11 @@ pub mod scheduling_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/schedulingpb.Scheduling/StoreHeartbeat", ); @@ -394,12 +383,11 @@ pub mod scheduling_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/schedulingpb.Scheduling/RegionHeartbeat", ); @@ -419,12 +407,11 @@ pub mod scheduling_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/schedulingpb.Scheduling/SplitRegions", ); @@ -444,12 +431,11 @@ pub mod scheduling_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/schedulingpb.Scheduling/ScatterRegions", ); @@ -469,12 +455,11 @@ pub mod scheduling_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/schedulingpb.Scheduling/GetOperator", ); @@ -494,12 +479,11 @@ pub mod scheduling_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/schedulingpb.Scheduling/AskBatchSplit", ); diff --git a/src/generated/tikvpb.rs b/src/generated/tikvpb.rs index e27b1cbf..ce853910 100644 --- a/src/generated/tikvpb.rs +++ b/src/generated/tikvpb.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchCommandsRequest { #[prost(message, repeated, tag = "1")] @@ -9,7 +8,6 @@ pub struct BatchCommandsRequest { } /// Nested message and enum types in `BatchCommandsRequest`. pub mod batch_commands_request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Request { #[prost( @@ -20,7 +18,6 @@ pub mod batch_commands_request { } /// Nested message and enum types in `Request`. pub mod request { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Cmd { #[prost(message, tag = "1")] @@ -95,7 +92,6 @@ pub mod batch_commands_request { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchCommandsResponse { #[prost(message, repeated, tag = "1")] @@ -108,7 +104,6 @@ pub struct BatchCommandsResponse { } /// Nested message and enum types in `BatchCommandsResponse`. pub mod batch_commands_response { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Response { #[prost( @@ -119,7 +114,6 @@ pub mod batch_commands_response { } /// Nested message and enum types in `Response`. pub mod response { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Cmd { #[prost(message, tag = "1")] @@ -194,14 +188,12 @@ pub mod batch_commands_response { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BatchRaftMessage { #[prost(message, repeated, tag = "1")] pub msgs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct BatchCommandsEmptyRequest { /// ID of the test request. #[prost(uint64, tag = "1")] @@ -210,8 +202,7 @@ pub struct BatchCommandsEmptyRequest { #[prost(uint64, tag = "2")] pub delay_time: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct BatchCommandsEmptyResponse { /// ID of the test request. #[prost(uint64, tag = "1")] @@ -219,7 +210,13 @@ pub struct BatchCommandsEmptyResponse { } /// Generated client implementations. pub mod tikv_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; /// Key/value store API for TiKV. @@ -240,10 +237,10 @@ pub mod tikv_client { } impl TikvClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -261,14 +258,14 @@ pub mod tikv_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { TikvClient::new(InterceptedService::new(inner, interceptor)) } @@ -315,12 +312,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvGet"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvGet")); @@ -337,12 +333,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvScan"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvScan")); @@ -359,12 +354,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvPrewrite"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvPrewrite")); @@ -383,12 +377,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvPessimisticLock", ); @@ -410,12 +403,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KVPessimisticRollback", ); @@ -435,12 +427,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvTxnHeartBeat", ); @@ -462,12 +453,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvCheckTxnStatus", ); @@ -489,12 +479,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvCheckSecondaryLocks", ); @@ -514,12 +503,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvCommit"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvCommit")); @@ -536,12 +524,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvImport"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvImport")); @@ -558,12 +545,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvCleanup"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvCleanup")); @@ -580,12 +566,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvBatchGet"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvBatchGet")); @@ -602,12 +587,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvBatchRollback", ); @@ -627,12 +611,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvScanLock"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvScanLock")); @@ -649,12 +632,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvResolveLock", ); @@ -673,12 +655,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/KvGC"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "KvGC")); @@ -695,12 +676,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvDeleteRange", ); @@ -721,12 +701,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvPrepareFlashbackToVersion", ); @@ -748,12 +727,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/KvFlashbackToVersion", ); @@ -774,12 +752,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawGet"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawGet")); @@ -796,12 +773,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawBatchGet"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawBatchGet")); @@ -818,12 +794,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawPut"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawPut")); @@ -840,12 +815,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawBatchPut"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawBatchPut")); @@ -862,12 +836,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawDelete"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawDelete")); @@ -886,12 +859,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/RawBatchDelete", ); @@ -911,12 +883,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawScan"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawScan")); @@ -935,12 +906,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/RawDeleteRange", ); @@ -960,12 +930,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawBatchScan"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawBatchScan")); @@ -983,12 +952,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawGetKeyTTL"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawGetKeyTTL")); @@ -1006,12 +974,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/RawCompareAndSwap", ); @@ -1031,12 +998,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/RawChecksum"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "RawChecksum")); @@ -1056,12 +1022,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/UnsafeDestroyRange", ); @@ -1083,12 +1048,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/RegisterLockObserver", ); @@ -1110,12 +1074,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/CheckLockObserver", ); @@ -1137,12 +1100,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/RemoveLockObserver", ); @@ -1164,12 +1126,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/PhysicalScanLock", ); @@ -1191,12 +1152,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/Coprocessor"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "Coprocessor")); @@ -1215,12 +1175,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/CoprocessorStream", ); @@ -1242,12 +1201,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/BatchCoprocessor", ); @@ -1270,12 +1228,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/RawCoprocessor", ); @@ -1298,12 +1255,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/Raft"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "Raft")); @@ -1320,12 +1276,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/BatchRaft"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "BatchRaft")); @@ -1344,12 +1299,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/Snapshot"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "Snapshot")); @@ -1372,12 +1326,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/TabletSnapshot", ); @@ -1398,12 +1351,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/SplitRegion"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "SplitRegion")); @@ -1421,12 +1373,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/ReadIndex"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "ReadIndex")); @@ -1444,12 +1395,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/MvccGetByKey"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "MvccGetByKey")); @@ -1468,12 +1418,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/MvccGetByStartTs", ); @@ -1496,12 +1445,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/BatchCommands", ); @@ -1521,12 +1469,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/DispatchMPPTask", ); @@ -1546,12 +1493,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/CancelMPPTask", ); @@ -1572,12 +1518,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/EstablishMPPConnection", ); @@ -1597,12 +1542,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/IsAlive"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "IsAlive")); @@ -1619,12 +1563,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/ReportMPPTaskStatus", ); @@ -1649,12 +1592,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/CheckLeader"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "CheckLeader")); @@ -1672,12 +1614,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/GetStoreSafeTS", ); @@ -1700,12 +1641,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/GetLockWaitInfo", ); @@ -1729,12 +1669,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/Compact"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "Compact")); @@ -1754,12 +1693,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/GetLockWaitHistory", ); @@ -1782,12 +1720,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/GetTiFlashSystemTable", ); @@ -1811,12 +1748,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tikvpb.Tikv/tryAddLock"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tikvpb.Tikv", "tryAddLock")); @@ -1836,12 +1772,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/tryMarkDelete", ); @@ -1863,12 +1798,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/EstablishDisaggTask", ); @@ -1891,12 +1825,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/CancelDisaggTask", ); @@ -1921,12 +1854,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/FetchDisaggPages", ); @@ -1949,12 +1881,11 @@ pub mod tikv_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tikvpb.Tikv/GetDisaggConfig", ); diff --git a/src/generated/tracepb.rs b/src/generated/tracepb.rs index 51a01547..ee9ccd90 100644 --- a/src/generated/tracepb.rs +++ b/src/generated/tracepb.rs @@ -1,8 +1,6 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TraceRecordRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TraceRecord { #[prost(oneof = "trace_record::RecordOneof", tags = "1, 2")] @@ -10,7 +8,6 @@ pub struct TraceRecord { } /// Nested message and enum types in `TraceRecord`. pub mod trace_record { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum RecordOneof { #[prost(message, tag = "1")] @@ -19,8 +16,7 @@ pub mod trace_record { NotifyCollect(super::NotifyCollect), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RemoteParentSpan { /// A unique id to identify the request. It's usually a UUID. #[prost(uint64, tag = "1")] @@ -30,7 +26,6 @@ pub struct RemoteParentSpan { pub span_id: u64, } /// The context of the request to be traced. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TraceContext { #[prost(message, repeated, tag = "1")] @@ -40,7 +35,6 @@ pub struct TraceContext { pub duration_threshold_ms: u32, } /// Report the spans collected when handling a request on a service. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Report { #[prost(message, repeated, tag = "1")] @@ -49,13 +43,11 @@ pub struct Report { pub spans: ::prost::alloc::vec::Vec, } /// Notify the subscriber to persis the spans of the trace. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct NotifyCollect { #[prost(uint64, tag = "1")] pub trace_id: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Span { /// The unique span id within the spans with the same `trace_id`. @@ -73,8 +65,7 @@ pub struct Span { #[prost(message, repeated, tag = "6")] pub properties: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Property { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, @@ -83,7 +74,13 @@ pub struct Property { } /// Generated client implementations. pub mod trace_record_pub_sub_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -103,10 +100,10 @@ pub mod trace_record_pub_sub_client { } impl TraceRecordPubSubClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -124,14 +121,14 @@ pub mod trace_record_pub_sub_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { TraceRecordPubSubClient::new(InterceptedService::new(inner, interceptor)) } @@ -179,12 +176,11 @@ pub mod trace_record_pub_sub_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tracepb.TraceRecordPubSub/Subscribe", ); diff --git a/src/generated/tsopb.rs b/src/generated/tsopb.rs index 61a3c6f5..0fcd45cd 100644 --- a/src/generated/tsopb.rs +++ b/src/generated/tsopb.rs @@ -1,6 +1,5 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct RequestHeader { /// cluster_id is the ID of the cluster which be sent to. #[prost(uint64, tag = "1")] @@ -15,8 +14,7 @@ pub struct RequestHeader { #[prost(uint32, tag = "4")] pub keyspace_group_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ResponseHeader { /// cluster_id is the ID of the cluster which sent the response. #[prost(uint64, tag = "1")] @@ -30,16 +28,14 @@ pub struct ResponseHeader { #[prost(uint32, tag = "4")] pub keyspace_group_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Error { #[prost(enumeration = "ErrorType", tag = "1")] pub r#type: i32, #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TsoRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -48,8 +44,7 @@ pub struct TsoRequest { #[prost(string, tag = "3")] pub dc_location: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct TsoResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -58,8 +53,7 @@ pub struct TsoResponse { #[prost(message, optional, tag = "3")] pub timestamp: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Participant { /// name is the unique name of the TSO participant. #[prost(string, tag = "1")] @@ -72,21 +66,18 @@ pub struct Participant { #[prost(string, repeated, tag = "3")] pub listen_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct KeyspaceGroupMember { #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, #[prost(bool, tag = "2")] pub is_primary: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SplitState { #[prost(uint32, tag = "1")] pub split_source: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct KeyspaceGroup { #[prost(uint32, tag = "1")] @@ -98,15 +89,13 @@ pub struct KeyspaceGroup { #[prost(message, repeated, tag = "4")] pub members: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct FindGroupByKeyspaceIdRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(uint32, tag = "2")] pub keyspace_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FindGroupByKeyspaceIdResponse { #[prost(message, optional, tag = "1")] @@ -114,16 +103,14 @@ pub struct FindGroupByKeyspaceIdResponse { #[prost(message, optional, tag = "2")] pub keyspace_group: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMinTsRequest { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, #[prost(string, tag = "2")] pub dc_location: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetMinTsResponse { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option, @@ -153,12 +140,12 @@ impl ErrorType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ErrorType::Ok => "OK", - ErrorType::Unknown => "UNKNOWN", - ErrorType::NotBootstrapped => "NOT_BOOTSTRAPPED", - ErrorType::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED", - ErrorType::InvalidValue => "INVALID_VALUE", - ErrorType::ClusterMismatched => "CLUSTER_MISMATCHED", + Self::Ok => "OK", + Self::Unknown => "UNKNOWN", + Self::NotBootstrapped => "NOT_BOOTSTRAPPED", + Self::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED", + Self::InvalidValue => "INVALID_VALUE", + Self::ClusterMismatched => "CLUSTER_MISMATCHED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -176,7 +163,13 @@ impl ErrorType { } /// Generated client implementations. pub mod tso_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; use tonic::codegen::http::Uri; #[derive(Debug, Clone)] @@ -196,10 +189,10 @@ pub mod tso_client { } impl TsoClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -217,14 +210,14 @@ pub mod tso_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , - >>::Error: Into + Send + Sync, + http::Request, + >>::Error: Into + std::marker::Send + std::marker::Sync, { TsoClient::new(InterceptedService::new(inner, interceptor)) } @@ -270,12 +263,11 @@ pub mod tso_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tsopb.TSO/Tso"); let mut req = request.into_streaming_request(); req.extensions_mut().insert(GrpcMethod::new("tsopb.TSO", "Tso")); @@ -293,12 +285,11 @@ pub mod tso_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tsopb.TSO/FindGroupByKeyspaceID", ); @@ -322,12 +313,11 @@ pub mod tso_client { .ready() .await .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, + tonic::Status::unknown( format!("Service was not ready: {}", e.into()), ) })?; - let codec = tonic::codec::ProstCodec::default(); + let codec = tonic_prost::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tsopb.TSO/GetMinTS"); let mut req = request.into_request(); req.extensions_mut().insert(GrpcMethod::new("tsopb.TSO", "GetMinTS")); diff --git a/src/request/plan.rs b/src/request/plan.rs index b7fac56f..e9091fbc 100644 --- a/src/request/plan.rs +++ b/src/request/plan.rs @@ -430,12 +430,7 @@ pub(crate) async fn on_region_epoch_not_match( let region_epoch = r.region_epoch.unwrap(); let returned_conf_ver = region_epoch.conf_ver; let returned_version = region_epoch.version; - let current_region_epoch = region_store - .region_with_leader - .region - .region_epoch - .clone() - .unwrap(); + let current_region_epoch = region_store.region_with_leader.region.region_epoch.unwrap(); let current_conf_ver = current_region_epoch.conf_ver; let current_version = current_region_epoch.version; @@ -678,7 +673,7 @@ impl Clone for ResolveLock { fn clone(&self) -> Self { ResolveLock { inner: self.inner.clone(), - timestamp: self.timestamp.clone(), + timestamp: self.timestamp, pd_client: self.pd_client.clone(), backoff: self.backoff.clone(), keyspace: self.keyspace, @@ -707,13 +702,8 @@ where } let pd_client = self.pd_client.clone(); - let live_locks = resolve_locks( - locks, - self.timestamp.clone(), - pd_client.clone(), - self.keyspace, - ) - .await?; + let live_locks = + resolve_locks(locks, self.timestamp, pd_client.clone(), self.keyspace).await?; if live_locks.is_empty() { result = self.inner.execute().await?; } else { diff --git a/src/transaction/client.rs b/src/transaction/client.rs index 62f24859..7ba95812 100644 --- a/src/transaction/client.rs +++ b/src/transaction/client.rs @@ -345,7 +345,7 @@ impl Client { loop { let resolved_locks = resolve_locks( live_locks.encode_keyspace(self.keyspace, KeyMode::Txn), - timestamp.clone(), + timestamp, self.pd.clone(), self.keyspace, ) diff --git a/src/transaction/transaction.rs b/src/transaction/transaction.rs index 1b715a7a..175ddfaa 100644 --- a/src/transaction/transaction.rs +++ b/src/transaction/transaction.rs @@ -134,7 +134,7 @@ impl Transaction { pub async fn get(&mut self, key: impl Into) -> Result> { trace!("invoking transactional get request"); self.check_allow_operation().await?; - let timestamp = self.timestamp.clone(); + let timestamp = self.timestamp; let rpc = self.rpc.clone(); let key = key.into().encode_keyspace(self.keyspace, KeyMode::Txn); let retry_options = self.options.retry_options.clone(); @@ -142,7 +142,7 @@ impl Transaction { self.buffer .get_or_else(key, |key| async move { - let request = new_get_request(key, timestamp.clone()); + let request = new_get_request(key, timestamp); let plan = PlanBuilder::new(rpc, keyspace, request) .resolve_lock(timestamp, retry_options.lock_backoff, keyspace) .retry_multi_region(DEFAULT_REGION_BACKOFF) @@ -267,7 +267,7 @@ impl Transaction { ) -> Result> { debug!("invoking transactional batch_get request"); self.check_allow_operation().await?; - let timestamp = self.timestamp.clone(); + let timestamp = self.timestamp; let rpc = self.rpc.clone(); let keyspace = self.keyspace; let keys = keys @@ -277,7 +277,7 @@ impl Transaction { self.buffer .batch_get_or_else(keys, move |keys| async move { - let request = new_batch_get_request(keys, timestamp.clone()); + let request = new_batch_get_request(keys, timestamp); let plan = PlanBuilder::new(rpc, keyspace, request) .resolve_lock(timestamp, retry_options.lock_backoff, keyspace) .retry_multi_region(retry_options.region_backoff) @@ -670,7 +670,7 @@ impl Transaction { let res = Committer::new( primary_key, mutations, - self.timestamp.clone(), + self.timestamp, self.rpc.clone(), self.options.clone(), self.keyspace, @@ -732,7 +732,7 @@ impl Transaction { let res = Committer::new( primary_key, mutations, - self.timestamp.clone(), + self.timestamp, self.rpc.clone(), self.options.clone(), self.keyspace, @@ -754,7 +754,7 @@ impl Transaction { /// Get the start timestamp of this transaction. pub fn start_timestamp(&self) -> Timestamp { - self.timestamp.clone() + self.timestamp } /// Send a heart beat message to keep the transaction alive on the server and update its TTL. @@ -769,13 +769,13 @@ impl Transaction { None => return Err(Error::NoPrimaryKey), }; let request = new_heart_beat_request( - self.timestamp.clone(), + self.timestamp, primary_key, self.start_instant.elapsed().as_millis() as u64 + MAX_TTL, ); let plan = PlanBuilder::new(self.rpc.clone(), self.keyspace, request) .resolve_lock( - self.timestamp.clone(), + self.timestamp, self.options.retry_options.lock_backoff.clone(), self.keyspace, ) @@ -795,7 +795,7 @@ impl Transaction { reverse: bool, ) -> Result> { self.check_allow_operation().await?; - let timestamp = self.timestamp.clone(); + let timestamp = self.timestamp; let rpc = self.rpc.clone(); let retry_options = self.options.retry_options.clone(); let keyspace = self.keyspace; @@ -808,13 +808,8 @@ impl Transaction { !key_only, reverse, move |new_range, new_limit| async move { - let request = new_scan_request( - new_range, - timestamp.clone(), - new_limit, - key_only, - reverse, - ); + let request = + new_scan_request(new_range, timestamp, new_limit, key_only, reverse); let plan = PlanBuilder::new(rpc, keyspace, request) .resolve_lock(timestamp, retry_options.lock_backoff, keyspace) .retry_multi_region(retry_options.region_backoff) @@ -865,18 +860,18 @@ impl Transaction { .get_primary_key() .unwrap_or_else(|| first_key.clone()); let for_update_ts = self.rpc.clone().get_timestamp().await?; - self.options.push_for_update_ts(for_update_ts.clone()); + self.options.push_for_update_ts(for_update_ts); let request = new_pessimistic_lock_request( keys.clone().into_iter(), primary_lock, - self.timestamp.clone(), + self.timestamp, MAX_TTL, - for_update_ts.clone(), + for_update_ts, need_value, ); let plan = PlanBuilder::new(self.rpc.clone(), self.keyspace, request) .resolve_lock( - self.timestamp.clone(), + self.timestamp, self.options.retry_options.lock_backoff.clone(), self.keyspace, ) @@ -899,7 +894,7 @@ impl Transaction { for_update_ts.version(), ); let keys = success_keys.into_iter().map(Key::from); - self.pessimistic_lock_rollback(keys, self.timestamp.clone(), for_update_ts) + self.pessimistic_lock_rollback(keys, self.timestamp, for_update_ts) .await?; Err(*inner) } @@ -939,7 +934,7 @@ impl Transaction { let req = new_pessimistic_rollback_request( keys.clone().into_iter(), - start_version.clone(), + start_version, for_update_ts, ); let plan = PlanBuilder::new(self.rpc.clone(), self.keyspace, req) @@ -986,7 +981,7 @@ impl Transaction { .buffer .get_primary_key() .expect("Primary key should exist"); - let start_ts = self.timestamp.clone(); + let start_ts = self.timestamp; let region_backoff = self.options.retry_options.region_backoff.clone(); let rpc = self.rpc.clone(); let heartbeat_interval = match self.options.heartbeat_option { @@ -1016,7 +1011,7 @@ impl Transaction { } } let request = new_heart_beat_request( - start_ts.clone(), + start_ts, primary_key.clone(), start_instant.elapsed().as_millis() as u64 + MAX_TTL, ); @@ -1351,7 +1346,7 @@ impl Committer { } } }; - tokio::spawn(self.commit_secondary(commit_ts.clone()).map(|res| { + tokio::spawn(self.commit_secondary(commit_ts).map(|res| { if let Err(e) = res { log::warn!("Failed to commit secondary keys: {}", e); } @@ -1372,15 +1367,15 @@ impl Committer { TransactionKind::Optimistic => new_prewrite_request( self.mutations.clone(), primary_lock, - self.start_version.clone(), + self.start_version, lock_ttl + elapsed, ), TransactionKind::Pessimistic(for_update_ts) => new_pessimistic_prewrite_request( self.mutations.clone(), primary_lock, - self.start_version.clone(), + self.start_version, lock_ttl + elapsed, - for_update_ts.clone(), + *for_update_ts, ), }; @@ -1396,7 +1391,7 @@ impl Committer { let plan = PlanBuilder::new(self.rpc.clone(), self.keyspace, request) .resolve_lock( - self.start_version.clone(), + self.start_version, self.options.retry_options.lock_backoff.clone(), self.keyspace, ) @@ -1436,14 +1431,10 @@ impl Committer { ); let primary_key = self.primary_key.clone().into_iter(); let commit_version = self.rpc.clone().get_timestamp().await?; - let req = new_commit_request( - primary_key, - self.start_version.clone(), - commit_version.clone(), - ); + let req = new_commit_request(primary_key, self.start_version, commit_version); let plan = PlanBuilder::new(self.rpc.clone(), self.keyspace, req) .resolve_lock( - self.start_version.clone(), + self.start_version, self.options.retry_options.lock_backoff.clone(), self.keyspace, ) @@ -1517,7 +1508,7 @@ impl Committer { self.start_version.version(), self.mutations.len() ); - let start_version = self.start_version.clone(); + let start_version = self.start_version; let mutations_len = self.mutations.len(); let primary_only = mutations_len == 1; #[cfg(not(feature = "integration-tests"))] @@ -1552,7 +1543,7 @@ impl Committer { let req = if self.options.async_commit { let keys = mutations.map(|m| m.key.into()); - new_commit_request(keys, start_version.clone(), commit_version) + new_commit_request(keys, start_version, commit_version) } else if primary_only { return Ok(()); } else { @@ -1560,7 +1551,7 @@ impl Committer { let keys = mutations .map(|m| m.key.into()) .filter(|key| &primary_key != key); - new_commit_request(keys, start_version.clone(), commit_version) + new_commit_request(keys, start_version, commit_version) }; let plan = PlanBuilder::new(self.rpc, self.keyspace, req) .resolve_lock( @@ -1587,13 +1578,13 @@ impl Committer { .mutations .into_iter() .map(|mutation| mutation.key.into()); - let start_version = self.start_version.clone(); + let start_version = self.start_version; match self.options.kind { TransactionKind::Optimistic => { - let req = new_batch_rollback_request(keys, start_version.clone()); + let req = new_batch_rollback_request(keys, start_version); let plan = PlanBuilder::new(self.rpc, self.keyspace, req) .resolve_lock( - start_version.clone(), + start_version, self.options.retry_options.lock_backoff, self.keyspace, ) @@ -1603,11 +1594,10 @@ impl Committer { plan.execute().await?; } TransactionKind::Pessimistic(for_update_ts) => { - let req = - new_pessimistic_rollback_request(keys, start_version.clone(), for_update_ts); + let req = new_pessimistic_rollback_request(keys, start_version, for_update_ts); let plan = PlanBuilder::new(self.rpc, self.keyspace, req) .resolve_lock( - start_version.clone(), + start_version, self.options.retry_options.lock_backoff, self.keyspace, )