From c7db330f6f07255dbc9bfee59feb81686f60bb95 Mon Sep 17 00:00:00 2001 From: Tinco Andringa Date: Mon, 28 Jul 2025 20:09:55 +0200 Subject: [PATCH 1/3] Upgrade tonic --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ed596da0..336f6330 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["database", "api-bindings"] keywords = ["qdrant", "vector-search", "search-engine", "client", "grpc"] [dependencies] -tonic = { version = "0.12.3", features = ["tls", "tls-roots", "gzip"] } +tonic = { version = "0.13.1", features = ["tls", "tls-roots", "gzip"] } prost = "0.13.3" prost-types = "0.13.3" anyhow = "1.0.89" From 41642ae73696da092f714379a52662d5a7a95718 Mon Sep 17 00:00:00 2001 From: Tinco Andringa Date: Mon, 28 Jul 2025 20:15:41 +0200 Subject: [PATCH 2/3] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 336f6330..82757086 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["database", "api-bindings"] keywords = ["qdrant", "vector-search", "search-engine", "client", "grpc"] [dependencies] -tonic = { version = "0.13.1", features = ["tls", "tls-roots", "gzip"] } +tonic = { version = "0.13.1", features = ["tls-webpki-roots", "transport"] } prost = "0.13.3" prost-types = "0.13.3" anyhow = "1.0.89" From 9f439630f1bda801a3c914b5d2e8086df99bd75b Mon Sep 17 00:00:00 2001 From: Tinco Andringa Date: Mon, 28 Jul 2025 20:46:48 +0200 Subject: [PATCH 3/3] upgrade protos --- Cargo.toml | 4 +-- src/channel_pool.rs | 2 +- src/qdrant.rs | 60 ++++++++++++++++++++++++++------------------- 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 82757086..443bb367 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["database", "api-bindings"] keywords = ["qdrant", "vector-search", "search-engine", "client", "grpc"] [dependencies] -tonic = { version = "0.13.1", features = ["tls-webpki-roots", "transport"] } +tonic = { version = "0.13.1", features = ["tls-webpki-roots", "transport", "gzip"] } prost = "0.13.3" prost-types = "0.13.3" anyhow = "1.0.89" @@ -29,7 +29,7 @@ semver = "1.0.24" uuid = { version = "1.8.2", optional = true } [dev-dependencies] -tonic-build = { version = "0.12.3", features = ["prost"] } +tonic-build = { version = "0.13.1", features = ["prost"] } [features] default = ["download_snapshots", "serde", "generate-snippets"] diff --git a/src/channel_pool.rs b/src/channel_pool.rs index 7722502d..d6583959 100644 --- a/src/channel_pool.rs +++ b/src/channel_pool.rs @@ -54,7 +54,7 @@ impl ChannelPool { .expect("Version info should be a valid header value"); let endpoint = if tls { - let tls_config = ClientTlsConfig::new().with_native_roots(); + let tls_config = ClientTlsConfig::new().with_enabled_roots(); endpoint .tls_config(tls_config) .map_err(|e| Status::internal(format!("Failed to create TLS config: {e}")))? diff --git a/src/qdrant.rs b/src/qdrant.rs index 52148d4b..82e7db63 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -284,6 +284,8 @@ pub struct OptimizersConfigDiff { #[prost(uint64, optional, tag = "3")] pub default_segment_number: ::core::option::Option, /// + /// Deprecated: + /// /// Do not create segments larger this size (in kilobytes). /// Large segments might require disproportionately long indexation times, /// therefore it makes sense to limit the size of segments. @@ -557,7 +559,7 @@ pub struct CreateCollection { /// How many replicas should apply the operation for us to consider it successful, default = 1 #[prost(uint32, optional, tag = "12")] pub write_consistency_factor: ::core::option::Option, - /// Specify name of the other collection to copy data from + /// Deprecated: specify name of the other collection to copy data from #[prost(string, optional, tag = "13")] pub init_from_collection: ::core::option::Option<::prost::alloc::string::String>, /// Quantization configuration of vector @@ -1721,7 +1723,7 @@ pub mod collections_client { } impl CollectionsClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -1742,13 +1744,13 @@ pub mod collections_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { CollectionsClient::new(InterceptedService::new(inner, interceptor)) @@ -2313,7 +2315,7 @@ pub mod collections_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -2920,7 +2922,9 @@ pub mod collections_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( @@ -5549,7 +5553,7 @@ pub mod points_client { } impl PointsClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -5570,13 +5574,13 @@ pub mod points_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { PointsClient::new(InterceptedService::new(inner, interceptor)) @@ -6626,7 +6630,7 @@ pub mod points_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -7865,7 +7869,9 @@ pub mod points_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( @@ -7997,7 +8003,7 @@ pub mod snapshots_client { } impl SnapshotsClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -8018,13 +8024,13 @@ pub mod snapshots_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { SnapshotsClient::new(InterceptedService::new(inner, interceptor)) @@ -8341,7 +8347,7 @@ pub mod snapshots_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -8624,7 +8630,9 @@ pub mod snapshots_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( @@ -8699,7 +8707,7 @@ pub mod qdrant_client { } impl QdrantClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -8720,13 +8728,13 @@ pub mod qdrant_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { QdrantClient::new(InterceptedService::new(inner, interceptor)) @@ -8873,7 +8881,7 @@ pub mod qdrant_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -8931,7 +8939,9 @@ pub mod qdrant_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert(