Skip to content

Commit

Permalink
fix: use spawn_blocking fsync
Browse files Browse the repository at this point in the history
keep the wasteful double-fsync while we have unsolved issues likely
moving the fsyncs around.
  • Loading branch information
koivunej committed Nov 10, 2023
1 parent 4eba16d commit f001d70
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pageserver/src/tenant/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3506,11 +3506,15 @@ impl Timeline {
// minimize latency.
//
// FIXME: spawn_blocking above for this
par_fsync::par_fsync(&layer_paths).context("fsync all new layers")?;
par_fsync::par_fsync_async(&layer_paths)
.await
.context("fsync all new layers")?;

par_fsync::par_fsync(&[self.conf.timeline_path(&self.tenant_id, &self.timeline_id)])
.context("fsync of timeline dir")?;
let timeline_dir = self.conf.timeline_path(&self.tenant_id, &self.timeline_id);

par_fsync::par_fsync_async(&[timeline_dir])
.await
.context("fsync of timeline dir")?;
}

stats.write_layer_files_micros = stats.read_lock_drop_micros.till_now();
Expand Down

0 comments on commit f001d70

Please sign in to comment.