From 1e61ac6af2b48d4849e89b4d3d910a160baacc2e Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Fri, 25 Jul 2025 13:33:02 +0200 Subject: [PATCH] cargo fmt (unrelated to prev commit) --- compute_tools/src/lib.rs | 2 +- pageserver/page_api/src/client.rs | 5 ++++- pageserver/src/metrics.rs | 11 +++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/compute_tools/src/lib.rs b/compute_tools/src/lib.rs index b231f6db8c..2ca7944875 100644 --- a/compute_tools/src/lib.rs +++ b/compute_tools/src/lib.rs @@ -20,6 +20,7 @@ pub mod lsn_lease; pub mod metrics; mod migration; pub mod monitor; +pub mod pageserver_client; pub mod params; pub mod pg_helpers; pub mod pgbouncer; @@ -30,4 +31,3 @@ mod spec_apply; pub mod swap; pub mod sync_sk; pub mod tls; -pub mod pageserver_client; diff --git a/pageserver/page_api/src/client.rs b/pageserver/page_api/src/client.rs index 757e8b284c..b8d3a77f3e 100644 --- a/pageserver/page_api/src/client.rs +++ b/pageserver/page_api/src/client.rs @@ -144,7 +144,10 @@ impl Client { Ok(resp.try_into()?) } - pub async fn lease_standby_horizon(&mut self, req: LeaseStandbyHorizonRequest) -> tonic::Result { + pub async fn lease_standby_horizon( + &mut self, + req: LeaseStandbyHorizonRequest, + ) -> tonic::Result { let req = proto::LeaseStandbyHorizonRequest::from(req); let resp = self.inner.lease_standby_horizon(req).await?.into_inner(); Ok(resp.try_into()?) diff --git a/pageserver/src/metrics.rs b/pageserver/src/metrics.rs index f14d93e5fb..a6e99450fa 100644 --- a/pageserver/src/metrics.rs +++ b/pageserver/src/metrics.rs @@ -735,7 +735,8 @@ static STANDBY_HORIZON_LEASES: Lazy = Lazy::new(|| { "pageserver_standby_horizon_leases", "Gauge indicating current number of standby horizon leases, per timeline", &["tenant_id", "shard_id", "timeline_id"] - ).expect("failed to define a metric") + ) + .expect("failed to define a metric") }); static RESIDENT_PHYSICAL_SIZE: Lazy = Lazy::new(|| { @@ -3344,11 +3345,9 @@ impl TimelineMetrics { legacy_value: STANDBY_HORIZON .get_metric_with_label_values(&[&tenant_id, &shard_id, &timeline_id]) .unwrap(), - leases_count_gauge: STANDBY_HORIZON_LEASES.get_metric_with_label_values(&[ - &tenant_id, - &shard_id, - &timeline_id, - ]).unwrap(), + leases_count_gauge: STANDBY_HORIZON_LEASES + .get_metric_with_label_values(&[&tenant_id, &shard_id, &timeline_id]) + .unwrap(), }; let resident_physical_size_gauge = RESIDENT_PHYSICAL_SIZE .get_metric_with_label_values(&[&tenant_id, &shard_id, &timeline_id])