From 630c8a9b86b2b2888f8d80c415b1c09ed73d8a9e Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Fri, 21 Jun 2024 09:44:59 +0000 Subject: [PATCH] cargo fmt initial --- pageserver/ctl/src/layer_map_analyzer.rs | 6 +++++- pageserver/src/consumption_metrics.rs | 3 ++- pageserver/src/pgdatadir_mapping.rs | 6 +++++- .../src/tenant/timeline/walreceiver/connection_manager.rs | 6 +++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pageserver/ctl/src/layer_map_analyzer.rs b/pageserver/ctl/src/layer_map_analyzer.rs index b3294b9a18..7766c7af75 100644 --- a/pageserver/ctl/src/layer_map_analyzer.rs +++ b/pageserver/ctl/src/layer_map_analyzer.rs @@ -99,7 +99,11 @@ pub(crate) fn parse_filename(name: &str) -> Option { } // Finds the max_holes largest holes, ignoring any that are smaller than MIN_HOLE_LENGTH" -async fn get_holes(path: &Utf8Path, max_holes: usize, ctx: &mut RequestContext) -> Result> { +async fn get_holes( + path: &Utf8Path, + max_holes: usize, + ctx: &mut RequestContext, +) -> Result> { let file = VirtualFile::open(path, ctx).await?; let file_id = page_cache::next_file_id(); let block_reader = FileBlockReader::new(&file, file_id); diff --git a/pageserver/src/consumption_metrics.rs b/pageserver/src/consumption_metrics.rs index 5787a41198..d3586c18a1 100644 --- a/pageserver/src/consumption_metrics.rs +++ b/pageserver/src/consumption_metrics.rs @@ -122,7 +122,8 @@ pub async fn collect_metrics( let started_at = Instant::now(); // these are point in time, with variable "now" - let metrics = metrics::collect_all_metrics(&tenant_manager, &cached_metrics, &mut ctx).await; + let metrics = + metrics::collect_all_metrics(&tenant_manager, &cached_metrics, &mut ctx).await; let metrics = Arc::new(metrics); diff --git a/pageserver/src/pgdatadir_mapping.rs b/pageserver/src/pgdatadir_mapping.rs index d78486153d..ab3fb145c7 100644 --- a/pageserver/src/pgdatadir_mapping.rs +++ b/pageserver/src/pgdatadir_mapping.rs @@ -1384,7 +1384,11 @@ impl<'a> DatadirModification<'a> { } /// Drop a relation. - pub async fn put_rel_drop(&mut self, rel: RelTag, ctx: &mut RequestContext) -> anyhow::Result<()> { + pub async fn put_rel_drop( + &mut self, + rel: RelTag, + ctx: &mut RequestContext, + ) -> anyhow::Result<()> { anyhow::ensure!(rel.relnode != 0, RelationError::InvalidRelnode); // Remove it from the directory entry diff --git a/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs b/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs index 1722acc1c9..0a06075a82 100644 --- a/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs +++ b/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs @@ -523,7 +523,11 @@ impl ConnectionManagerState { } /// Shuts down the current connection (if any) and immediately starts another one with the given connection string. - async fn change_connection(&mut self, new_sk: NewWalConnectionCandidate, ctx: &mut RequestContext) { + async fn change_connection( + &mut self, + new_sk: NewWalConnectionCandidate, + ctx: &mut RequestContext, + ) { WALRECEIVER_SWITCHES .with_label_values(&[new_sk.reason.name()]) .inc();