From 682a54fa9ec3af644a44e8b4a88567f99da91cf7 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Fri, 11 Jul 2025 13:29:48 +0100 Subject: [PATCH] replace lasso completely --- Cargo.lock | 30 +++--------------------------- Cargo.toml | 3 +-- storage_controller/Cargo.toml | 4 ++-- storage_controller/src/metrics.rs | 28 ++++++++++++++-------------- 4 files changed, 20 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ad28e912e7..6710e520ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1762,19 +1762,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "dashmap" -version = "5.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core 0.9.10", -] - [[package]] name = "dashmap" version = "6.1.0" @@ -2610,7 +2597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "842dc78579ce01e6a1576ad896edc92fca002dd60c9c3746b7fc2bec6fb429d0" dependencies = [ "cfg-if", - "dashmap 6.1.0", + "dashmap", "futures-sink", "futures-timer", "futures-util", @@ -3316,7 +3303,7 @@ dependencies = [ "clap", "crossbeam-channel", "crossbeam-utils", - "dashmap 6.1.0", + "dashmap", "env_logger", "indexmap 2.9.0", "itoa", @@ -3573,16 +3560,6 @@ dependencies = [ "libc", ] -[[package]] -name = "lasso" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4644821e1c3d7a560fe13d842d13f587c07348a1a05d3a797152d41c90c56df2" -dependencies = [ - "dashmap 5.5.0", - "hashbrown 0.13.2", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -3721,7 +3698,6 @@ dependencies = [ "crossbeam-utils", "hashbrown 0.14.5", "itoa", - "lasso", "measured-derive", "memchr", "paracord", @@ -6973,12 +6949,12 @@ dependencies = [ "hyper 0.14.30", "itertools 0.10.5", "json-structural-diff", - "lasso", "measured", "metrics", "once_cell", "pageserver_api", "pageserver_client", + "paracord", "postgres_connection", "posthog_client_lite", "rand 0.8.5", diff --git a/Cargo.toml b/Cargo.toml index d662cf9bc0..bb6f5d37ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -128,10 +128,9 @@ itertools = "0.10" itoa = "1.0.11" jemalloc_pprof = { version = "0.7", features = ["symbolize", "flamegraph"] } jsonwebtoken = "9" -lasso = "0.7" libc = "0.2" md5 = "0.7.0" -measured = { version = "0.0.23", features = ["paracord", "lasso"], path = "../../code/measured/core" } +measured = { version = "0.0.23", features = ["paracord"], path = "../../code/measured/core" } measured-process = { version = "0.0.23", path = "../../code/measured/process" } measured-tokio = { version = "0.0.23", path = "../../code/measured/tokio" } memoffset = "0.9" diff --git a/storage_controller/Cargo.toml b/storage_controller/Cargo.toml index 143f4241f4..8346d73595 100644 --- a/storage_controller/Cargo.toml +++ b/storage_controller/Cargo.toml @@ -31,10 +31,10 @@ humantime.workspace = true humantime-serde.workspace = true itertools.workspace = true json-structural-diff.workspace = true -lasso.workspace = true once_cell.workspace = true pageserver_api.workspace = true pageserver_client.workspace = true +paracord.workspace = true postgres_connection.workspace = true posthog_client_lite.workspace = true rand.workspace = true @@ -72,4 +72,4 @@ http-utils = { path = "../libs/http-utils/" } utils = { path = "../libs/utils/" } metrics = { path = "../libs/metrics/" } control_plane = { path = "../control_plane" } -workspace_hack = { version = "0.1", path = "../workspace_hack" } \ No newline at end of file +workspace_hack = { version = "0.1", path = "../workspace_hack" } diff --git a/storage_controller/src/metrics.rs b/storage_controller/src/metrics.rs index 8738386968..e7c6a16acf 100644 --- a/storage_controller/src/metrics.rs +++ b/storage_controller/src/metrics.rs @@ -183,9 +183,9 @@ impl Default for StorageControllerMetrics { #[derive(measured::LabelGroup, Clone)] #[label(set = NodeLabelGroupSet)] pub(crate) struct NodeLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) az: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) node_id: &'a str, } @@ -198,7 +198,7 @@ pub(crate) struct ReconcileCompleteLabelGroup { #[derive(measured::LabelGroup)] #[label(set = HttpRequestStatusLabelGroupSet)] pub(crate) struct HttpRequestStatusLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) path: &'a str, pub(crate) method: Method, pub(crate) status: StatusCode, @@ -207,7 +207,7 @@ pub(crate) struct HttpRequestStatusLabelGroup<'a> { #[derive(measured::LabelGroup)] #[label(set = HttpRequestLatencyLabelGroupSet)] pub(crate) struct HttpRequestLatencyLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) path: &'a str, pub(crate) method: Method, } @@ -215,9 +215,9 @@ pub(crate) struct HttpRequestLatencyLabelGroup<'a> { #[derive(measured::LabelGroup, Clone)] #[label(set = PageserverRequestLabelGroupSet)] pub(crate) struct PageserverRequestLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) pageserver_id: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) path: &'a str, pub(crate) method: Method, } @@ -225,9 +225,9 @@ pub(crate) struct PageserverRequestLabelGroup<'a> { #[derive(measured::LabelGroup, Clone)] #[label(set = SafekeeperRequestLabelGroupSet)] pub(crate) struct SafekeeperRequestLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) safekeeper_id: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) path: &'a str, pub(crate) method: Method, } @@ -254,11 +254,11 @@ pub(crate) struct LeadershipStatusGroup { #[derive(measured::LabelGroup, Clone)] #[label(set = ReconcileLongRunningLabelGroupSet)] pub(crate) struct ReconcileLongRunningLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) tenant_id: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) shard_number: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) sequence: &'a str, } @@ -282,11 +282,11 @@ pub(crate) enum Method { #[derive(measured::LabelGroup, Clone)] #[label(set = SafekeeperReconcilerLabelGroupSet)] pub(crate) struct SafekeeperReconcilerLabelGroup<'a> { - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) sk_az: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) sk_node_id: &'a str, - #[label(dynamic_with = lasso::ThreadedRodeo, default)] + #[label(dynamic_with = paracord::ParaCord, default)] pub(crate) sk_hostname: &'a str, }