diff --git a/crates/ecstore/src/disk/local.rs b/crates/ecstore/src/disk/local.rs index 44e0eb4276..4427d87197 100644 --- a/crates/ecstore/src/disk/local.rs +++ b/crates/ecstore/src/disk/local.rs @@ -15273,11 +15273,12 @@ async fn batch_shard_pread_blocking(requests: Vec) - metrics.as_deref(), LocalBatchReadStage::Read, || { - // Preload the requested window before reading it. Kernel - // readahead is advisory and may still extend past the - // window, so the tail is reclaimed after the read below. + // Preload just this window. Disable automatic readahead + // on this descriptor so pread does not start a second + // read past the window while the explicit hint is in flight. #[cfg(target_os = "linux")] if let (Ok(start), Ok(len)) = (u64::try_from(offset), u64::try_from(length)) { + let _ = rustix::fs::fadvise(&file, 0, None, rustix::fs::Advice::Random); let _ = rustix::fs::fadvise( &file, start,