mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
cargo fmt initial
This commit is contained in:
@@ -99,7 +99,11 @@ pub(crate) fn parse_filename(name: &str) -> Option<LayerFile> {
|
||||
}
|
||||
|
||||
// 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<Vec<Hole>> {
|
||||
async fn get_holes(
|
||||
path: &Utf8Path,
|
||||
max_holes: usize,
|
||||
ctx: &mut RequestContext,
|
||||
) -> Result<Vec<Hole>> {
|
||||
let file = VirtualFile::open(path, ctx).await?;
|
||||
let file_id = page_cache::next_file_id();
|
||||
let block_reader = FileBlockReader::new(&file, file_id);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user