From 95244912c53dd83caf6c85afb6a781fc75ae9db5 Mon Sep 17 00:00:00 2001 From: Arthur Petukhovsky Date: Sat, 29 Apr 2023 13:31:04 +0300 Subject: [PATCH] Override sharded-slab to increase MAX_THREADS (#4122) Add patch directive to Cargo.toml to use patched version of sharded-slab: https://github.com/neondatabase/sharded-slab/commit/98d16753ab01c61f0a028de44167307a00efea00 Patch changes the MAX_THREADS limit from 4096 to 32768. This is a temporary workaround for using tracing from many threads in safekeepers code, until async safekeepers patch is merged to the main. Note that patch can affect other rust services, not only the safekeeper binary. --- Cargo.lock | 3 +-- Cargo.toml | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc63cb0442..bce2d11188 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3960,8 +3960,7 @@ dependencies = [ [[package]] name = "sharded-slab" version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +source = "git+https://github.com/neondatabase/sharded-slab.git?rev=98d16753ab01c61f0a028de44167307a00efea00#98d16753ab01c61f0a028de44167307a00efea00" dependencies = [ "lazy_static", ] diff --git a/Cargo.toml b/Cargo.toml index a18236d09a..b73e29ef6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -161,11 +161,17 @@ rstest = "0.17" tempfile = "3.4" tonic-build = "0.9" +[patch.crates-io] + # This is only needed for proxy's tests. # TODO: we should probably fork `tokio-postgres-rustls` instead. -[patch.crates-io] tokio-postgres = { git = "https://github.com/neondatabase/rust-postgres.git", rev="0bc41d8503c092b040142214aac3cf7d11d0c19f" } +# Changes the MAX_THREADS limit from 4096 to 32768. +# This is a temporary workaround for using tracing from many threads in safekeepers code, +# until async safekeepers patch is merged to the main. +sharded-slab = { git = "https://github.com/neondatabase/sharded-slab.git", rev="98d16753ab01c61f0a028de44167307a00efea00" } + ################# Binary contents sections [profile.release]