From 94db6b4de8e5bee62989863d3bb00d6377e63b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Sun, 2 Feb 2025 13:03:27 +0100 Subject: [PATCH 01/29] node: fix docstring --- scylla/src/cluster/node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scylla/src/cluster/node.rs b/scylla/src/cluster/node.rs index 1e66f9be93..f11b31ba7e 100644 --- a/scylla/src/cluster/node.rs +++ b/scylla/src/cluster/node.rs @@ -132,8 +132,8 @@ impl Node { /// The underlying pool is preserved and notified about the IP change. /// # Arguments /// - /// `node` - previous definition of that node - /// `address` - new address to connect to + /// - `node` - previous definition of that node + /// - `address` - new address to connect to pub(crate) fn inherit_with_ip_changed(node: &Node, endpoint: PeerEndpoint) -> Self { let address = endpoint.address; if let Some(ref pool) = node.pool { From e365701cdfe7b1703012c527bd731389c638ade0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Wed, 29 Jan 2025 08:40:42 +0100 Subject: [PATCH 02/29] connection_pool: fix outdated comments ConnectionKeeper is no longer there. --- scylla/src/network/connection_pool.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scylla/src/network/connection_pool.rs b/scylla/src/network/connection_pool.rs index 835ac3f211..3b9833b66f 100644 --- a/scylla/src/network/connection_pool.rs +++ b/scylla/src/network/connection_pool.rs @@ -328,10 +328,10 @@ impl NodeConnectionPool { response_sender, }) .await - .expect("Bug in ConnectionKeeper::use_keyspace sending"); - // Other end of this channel is in the Refiller, can't be dropped while we have &self to _refiller_handle + .expect("Bug in NodeConnectionPool::use_keyspace sending"); + // Other end of this channel is in the PoolRefiller, can't be dropped while we have &self to _refiller_handle - response_receiver.await.unwrap() // NodePoolRefiller always responds + response_receiver.await.unwrap() // PoolRefiller always responds } // Waits until the pool becomes initialized. From f2aca039ada93c30f167152a944222e4d39fdfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Wed, 29 Jan 2025 10:22:39 +0100 Subject: [PATCH 03/29] connection_pool: impl Default for PoolConfig only for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The impl of Default for PoolConfig is only useful for tests. Co-authored-by: Karol Baryła --- scylla/src/network/connection_pool.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/scylla/src/network/connection_pool.rs b/scylla/src/network/connection_pool.rs index 3b9833b66f..d78b46d209 100644 --- a/scylla/src/network/connection_pool.rs +++ b/scylla/src/network/connection_pool.rs @@ -65,6 +65,7 @@ pub(crate) struct PoolConfig { pub(crate) keepalive_interval: Option, } +#[cfg(test)] impl Default for PoolConfig { fn default() -> Self { Self { From 9d0bab359cbea137f9139a86ec76b3ec8c54afc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Bary=C5=82a?= Date: Sat, 30 Nov 2024 10:44:02 +0100 Subject: [PATCH 04/29] PoolConfig: remove keepalive_interval It was only passed around back and forth, but unused apart from that. The keepalive interval that is used in keepaliver comes from ConnectionConfig, not PoolConfig. --- scylla/src/client/session.rs | 1 - scylla/src/cluster/metadata.rs | 10 +--------- scylla/src/cluster/worker.rs | 1 - scylla/src/network/connection_pool.rs | 2 -- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/scylla/src/client/session.rs b/scylla/src/client/session.rs index dd2efbcaf1..d737c2f45b 100644 --- a/scylla/src/client/session.rs +++ b/scylla/src/client/session.rs @@ -1009,7 +1009,6 @@ where connection_config, pool_size: config.connection_pool_size, can_use_shard_aware_port: !config.disallow_shard_aware_port, - keepalive_interval: config.keepalive_interval, }; let cluster = Cluster::new( diff --git a/scylla/src/cluster/metadata.rs b/scylla/src/cluster/metadata.rs index 2ac5ec0feb..e01671c797 100644 --- a/scylla/src/cluster/metadata.rs +++ b/scylla/src/cluster/metadata.rs @@ -44,7 +44,7 @@ use std::net::{IpAddr, SocketAddr}; use std::num::NonZeroUsize; use std::str::FromStr; use std::sync::Arc; -use std::time::{Duration, Instant}; +use std::time::Instant; use thiserror::Error; use tokio::sync::{broadcast, mpsc}; use tracing::{debug, error, trace, warn}; @@ -70,7 +70,6 @@ type PerKsTableResult = PerKsTable>; /// Allows to read current metadata from the cluster pub(crate) struct MetadataReader { connection_config: ConnectionConfig, - keepalive_interval: Option, control_connection_endpoint: UntranslatedEndpoint, control_connection: NodeConnectionPool, @@ -399,7 +398,6 @@ impl MetadataReader { initial_known_nodes: Vec, control_connection_repair_requester: broadcast::Sender<()>, mut connection_config: ConnectionConfig, - keepalive_interval: Option, server_event_sender: mpsc::Sender, keyspaces_to_fetch: Vec, fetch_schema: bool, @@ -429,14 +427,12 @@ impl MetadataReader { let control_connection = Self::make_control_connection_pool( control_connection_endpoint.clone(), connection_config.clone(), - keepalive_interval, control_connection_repair_requester.clone(), ); Ok(MetadataReader { control_connection_endpoint, control_connection, - keepalive_interval, connection_config, known_peers: initial_peers .into_iter() @@ -550,7 +546,6 @@ impl MetadataReader { self.control_connection = Self::make_control_connection_pool( self.control_connection_endpoint.clone(), self.connection_config.clone(), - self.keepalive_interval, self.control_connection_repair_requester.clone(), ); @@ -648,7 +643,6 @@ impl MetadataReader { self.control_connection = Self::make_control_connection_pool( self.control_connection_endpoint.clone(), self.connection_config.clone(), - self.keepalive_interval, self.control_connection_repair_requester.clone(), ); } @@ -659,12 +653,10 @@ impl MetadataReader { fn make_control_connection_pool( endpoint: UntranslatedEndpoint, connection_config: ConnectionConfig, - keepalive_interval: Option, refresh_requester: broadcast::Sender<()>, ) -> NodeConnectionPool { let pool_config = PoolConfig { connection_config, - keepalive_interval, // We want to have only one connection to receive events from pool_size: PoolSize::PerHost(NonZeroUsize::new(1).unwrap()), diff --git a/scylla/src/cluster/worker.rs b/scylla/src/cluster/worker.rs index 1d047377e1..9d88b79891 100644 --- a/scylla/src/cluster/worker.rs +++ b/scylla/src/cluster/worker.rs @@ -124,7 +124,6 @@ impl Cluster { known_nodes, control_connection_repair_sender, pool_config.connection_config.clone(), - pool_config.keepalive_interval, server_events_sender, keyspaces_to_fetch, fetch_schema_metadata, diff --git a/scylla/src/network/connection_pool.rs b/scylla/src/network/connection_pool.rs index d78b46d209..95f5748034 100644 --- a/scylla/src/network/connection_pool.rs +++ b/scylla/src/network/connection_pool.rs @@ -62,7 +62,6 @@ pub(crate) struct PoolConfig { pub(crate) connection_config: ConnectionConfig, pub(crate) pool_size: PoolSize, pub(crate) can_use_shard_aware_port: bool, - pub(crate) keepalive_interval: Option, } #[cfg(test)] @@ -72,7 +71,6 @@ impl Default for PoolConfig { connection_config: Default::default(), pool_size: Default::default(), can_use_shard_aware_port: true, - keepalive_interval: None, } } } From 1af784109ca47b3fddd33ac51ad4ba6b41ec8ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Wed, 29 Jan 2025 08:37:11 +0100 Subject: [PATCH 05/29] Cargo.toml: bump openssl dep to 0.10.69 This updates openssl to its latest available patch release. The version that we required had some security vulnerabilities reported. --- Cargo.lock.msrv | 165 ++++++++++++++++++++++++---------------------- scylla/Cargo.toml | 2 +- 2 files changed, 88 insertions(+), 79 deletions(-) diff --git a/Cargo.lock.msrv b/Cargo.lock.msrv index d594b3b41c..d7463d306f 100644 --- a/Cargo.lock.msrv +++ b/Cargo.lock.msrv @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -119,9 +119,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -189,9 +189,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.97" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -208,7 +211,7 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -290,9 +293,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "criterion" @@ -656,9 +659,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "half" @@ -815,9 +818,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -840,16 +843,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -1047,9 +1040,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1068,9 +1061,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" dependencies = [ "bitflags 2.5.0", "cfg-if", @@ -1094,9 +1087,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1134,9 +1127,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1325,21 +1318,30 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.5.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "libredox", + "redox_syscall 0.2.16", "thiserror 1.0.60", ] @@ -1626,6 +1628,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2111,19 +2119,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -2136,9 +2145,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2146,9 +2155,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -2159,15 +2168,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -2191,11 +2200,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -2210,7 +2219,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2228,7 +2237,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2248,18 +2257,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2270,9 +2279,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2282,9 +2291,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2294,15 +2303,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2312,9 +2321,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2324,9 +2333,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2336,9 +2345,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2348,9 +2357,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" diff --git a/scylla/Cargo.toml b/scylla/Cargo.toml index 2303730864..0a8f0bc48d 100644 --- a/scylla/Cargo.toml +++ b/scylla/Cargo.toml @@ -63,7 +63,7 @@ thiserror = "2.0.6" itertools = "0.13.0" tracing = "0.1.36" chrono = { version = "0.4.32", default-features = false, features = ["clock"] } -openssl = { version = "0.10.32", optional = true } +openssl = { version = "0.10.69", optional = true } tokio-openssl = { version = "0.6.1", optional = true } arc-swap = "1.3.0" dashmap = "5.2" From 07ebd7c58c890b9e43128d46b999fd22cd78879a Mon Sep 17 00:00:00 2001 From: Andres Medina Date: Tue, 14 Jan 2025 21:30:45 -0800 Subject: [PATCH 06/29] scylla: rename "ssl" feature to "openssl-010" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As openssl crate is still before its 1.0 (stable) release, we need to prepare for its possible introduces breaking changes. As it's present in our public API, we hide it behind a versioned feature flag. This way, if in the future openssl is released in 0.11 or 1.0 version, we'll simply add the new feature flag and gradually deprecate the old one. As a side note, openssl crate hasn't issued a major release for 7 years now, so it's plausible that it's not going to happen (at least soon). Co-authored-by: Wojciech Przytuła --- .github/workflows/tls.yml | 2 +- Cargo.lock.msrv | 8 ++++---- docs/source/connecting/tls.md | 8 ++++---- examples/Cargo.toml | 2 +- scylla/Cargo.toml | 4 ++-- scylla/src/client/session.rs | 10 +++++----- scylla/src/client/session_builder.rs | 4 ++-- scylla/src/network/connection.rs | 18 +++++++++--------- scylla/src/network/connection_pool.rs | 2 +- scylla/src/network/mod.rs | 2 +- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/tls.yml b/.github/workflows/tls.yml index 5691900bd1..308018b561 100644 --- a/.github/workflows/tls.yml +++ b/.github/workflows/tls.yml @@ -36,7 +36,7 @@ jobs: - name: Update rust toolchain run: rustup update - name: Check - run: cargo check --verbose --features "ssl" + run: cargo check --verbose --features "openssl-010" working-directory: ${{env.working-directory}} - name: Run tls example run: cargo run --example tls diff --git a/Cargo.lock.msrv b/Cargo.lock.msrv index d7463d306f..a798dc52ac 100644 --- a/Cargo.lock.msrv +++ b/Cargo.lock.msrv @@ -502,7 +502,7 @@ dependencies = [ "clap", "env_logger", "futures", - "openssl", + "openssl-010", "rand", "rustyline", "rustyline-derive", @@ -1060,7 +1060,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] -name = "openssl" +name = "openssl-010" version = "0.10.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e" @@ -1486,7 +1486,7 @@ dependencies = [ "ntest", "num-bigint 0.3.3", "num-bigint 0.4.5", - "openssl", + "openssl-010", "rand", "rand_chacha", "rand_pcg", @@ -1900,7 +1900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ffab79df67727f6acf57f1ff743091873c24c579b1e2ce4d8f53e47ded4d63d" dependencies = [ "futures-util", - "openssl", + "openssl-010", "openssl-sys", "tokio", ] diff --git a/docs/source/connecting/tls.md b/docs/source/connecting/tls.md index 88e472315b..d1c1fe82d5 100644 --- a/docs/source/connecting/tls.md +++ b/docs/source/connecting/tls.md @@ -10,12 +10,12 @@ It was chosen because [`rustls`](https://github.com/ctz/rustls) doesn't support To enable the `tls` feature add in `Cargo.toml`: ```toml -scylla = { version = "0.4", features = ["ssl"] } +scylla = { version = "0.4", features = ["openssl-010"] } openssl = "0.10.32" ``` Then install the package with `openssl`: -* Debian/Ubuntu: +* Debian/Ubuntu: ```bash apt install libssl-dev pkg-config ``` @@ -23,7 +23,7 @@ Then install the package with `openssl`: ```bash dnf install openssl-devel ``` -