replace lasso completely

This commit is contained in:
Conrad Ludgate
2025-07-11 13:29:48 +01:00
parent d5c17559ce
commit 682a54fa9e
4 changed files with 20 additions and 45 deletions

30
Cargo.lock generated
View File

@@ -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",

View File

@@ -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"

View File

@@ -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" }
workspace_hack = { version = "0.1", path = "../workspace_hack" }

View File

@@ -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,
}