From 1f4910ad8eba4b3efffe28d6e62e427c0176259f Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 17 Jan 2024 10:28:19 +0000 Subject: [PATCH] Upgrade async-nats (#356) ## Changes --- CHANGELOG.md | 1 + lib/pools/Cargo.toml | 2 +- lib/pools/src/lib.rs | 3 --- svc/Cargo.lock | 13 ++++++------- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a70224d6d0..115877894d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **pools** Decrease SQLx `idle_timeout` to 3 minutes - **pools** Set ClickHouse `idle_timeout` to 15 seconds - **api-helper** Box path futures for faster compile times +- Upgrade `async-nats` ### Security diff --git a/lib/pools/Cargo.toml b/lib/pools/Cargo.toml index 6c1e8126fe..e4b40d2050 100644 --- a/lib/pools/Cargo.toml +++ b/lib/pools/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Rivet Gaming, LLC "] license = "Apache-2.0" [dependencies] -async-nats = "0.31" +async-nats = "0.33" clickhouse = { version = "0.11.2" } funty = "=1.1.0" # Fixes issue with sqlx dependency, see https://github.com/bitvecto-rs/bitvec/issues/105#issuecomment-778570981 global-error = { path = "../global-error" } diff --git a/lib/pools/src/lib.rs b/lib/pools/src/lib.rs index f71c77098f..bd0511fbab 100644 --- a/lib/pools/src/lib.rs +++ b/lib/pools/src/lib.rs @@ -78,9 +78,6 @@ async fn nats_from_env(client_name: String) -> Result, Error> { async_nats::ConnectOptions::new() }; options = options - // Flush frequently since we don't flush messages - // TODO: Lower this interval in development to reduce overhead - .flush_interval(Duration::from_millis(50)) .client_capacity(256) .subscription_capacity(8192) .event_callback({ diff --git a/svc/Cargo.lock b/svc/Cargo.lock index f36d2abd92..3bcb358784 100644 --- a/svc/Cargo.lock +++ b/svc/Cargo.lock @@ -873,22 +873,22 @@ checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "async-nats" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8257238e2a3629ee5618502a75d1b91f8017c24638c75349fc8d2d80cf1f7c4c" +checksum = "dbc1f1a75fd07f0f517322d103211f12d757658e91676def9a2e688774656c60" dependencies = [ "base64 0.21.5", "bytes", "futures", "http", - "itoa 1.0.9", "memchr", "nkeys", "nuid", "once_cell", "rand", "regex", - "ring 0.16.20", + "ring 0.17.5", + "rustls 0.21.8", "rustls-native-certs 0.6.3", "rustls-pemfile", "rustls-webpki", @@ -5416,11 +5416,10 @@ dependencies = [ [[package]] name = "nuid" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c1bb65186718d348306bf1afdeb20d9ab45b2ab80fb793c0fdcf59ffbb4f38" +checksum = "fc895af95856f929163a0aa20c26a78d26bfdc839f51b9d5aa7a5b79e52b7e83" dependencies = [ - "lazy_static", "rand", ]