diff --git a/pageserver/src/virtual_file.rs b/pageserver/src/virtual_file.rs index 3d725a2e91..73671dcf4e 100644 --- a/pageserver/src/virtual_file.rs +++ b/pageserver/src/virtual_file.rs @@ -334,8 +334,9 @@ impl VirtualFile { // library RwLock doesn't allow downgrading without releasing the lock, // and that doesn't seem worth the trouble. // - // XXX `parking_lot::RwLock` can enable such downgrades, yet its implemenation is fair and - // may deadlock on subsequent read calls, not all code places would benefit from such benaviour + // XXX: `parking_lot::RwLock` can enable such downgrades, yet its implemenation is fair and + // may deadlock on subsequent read calls. + // Simply replacing all `RwLock` in project causes deadlocks, so use it sparingly. let result = STORAGE_IO_TIME .with_label_values(&[op, &self.tenantid, &self.timelineid]) .observe_closure_duration(|| func(&file)); diff --git a/zenith/src/main.rs b/zenith/src/main.rs index 4a345799eb..db3624eb8b 100644 --- a/zenith/src/main.rs +++ b/zenith/src/main.rs @@ -67,9 +67,17 @@ struct BranchTreeEl { // * Providing CLI api to the pageserver // * TODO: export/import to/from usual postgres fn main() -> Result<()> { - let pg_node_arg = Arg::new("node").index(1).help("Node name").required(true); + #[rustfmt::skip] // rustfmt squashes these into a single line otherwise + let pg_node_arg = Arg::new("node") + .index(1) + .help("Node name") + .required(true); - let safekeeper_node_arg = Arg::new("node").index(1).help("Node name").required(false); + #[rustfmt::skip] + let safekeeper_node_arg = Arg::new("node") + .index(1) + .help("Node name") + .required(false); let timeline_arg = Arg::new("timeline") .index(2) @@ -442,7 +450,7 @@ fn handle_tenant(tenant_match: &ArgMatches, env: &local_env::LocalEnv) -> Result println!("tenant successfully created on the pageserver"); } Some((sub_name, _)) => bail!("Unexpected tenant subcommand '{}'", sub_name), - None => bail!("No tenant subcommand found"), + None => bail!("no tenant subcommand provided"), } Ok(()) } @@ -614,7 +622,7 @@ fn handle_pageserver(sub_match: &ArgMatches, env: &local_env::LocalEnv) -> Resul } } Some((sub_name, _)) => bail!("Unexpected pageserver subcommand '{}'", sub_name), - None => bail!("No pageserver subcommand given"), + None => bail!("no pageserver subcommand provided"), } Ok(()) } diff --git a/zenith_utils/src/http/mod.rs b/zenith_utils/src/http/mod.rs index ed2f8c0dc1..ef842fd2ff 100644 --- a/zenith_utils/src/http/mod.rs +++ b/zenith_utils/src/http/mod.rs @@ -3,6 +3,6 @@ pub mod error; pub mod json; pub mod request; -/// Current fast way to applly simple http routing in varuious Zenith binaries. -/// Reexported for sake of uniform approach, that could be later replaced with better alternatives, if needed. +/// Current fast way to apply simple http routing in various Zenith binaries. +/// Re-exported for sake of uniform approach, that could be later replaced with better alternatives, if needed. pub use routerify::{ext::RequestExt, RouterBuilder};