diff --git a/crates/recording/src/studio_recording.rs b/crates/recording/src/studio_recording.rs index 762ae485795..60ed1c6e944 100644 --- a/crates/recording/src/studio_recording.rs +++ b/crates/recording/src/studio_recording.rs @@ -1496,7 +1496,15 @@ impl Pipeline { firsts[3], ); if written != Some(times) { - match write_segment_start_times(&segment_dir, ×) { + // A blocking write and two fsyncs: keep them off the + // runtime workers the capture pipelines run on. + let dir = segment_dir.clone(); + let result = tokio::task::spawn_blocking(move || { + write_segment_start_times(&dir, ×) + }) + .await + .unwrap_or_else(|error| Err(std::io::Error::other(error))); + match result { Ok(()) => written = Some(times), Err(error) => { failed_writes += 1;