perf(ecstore): batch local EC shard preads on GET (#5679)

Collapse per-shard blocking-pool round-trips into one spawn_blocking
pread batch when all online shards are local and mmap-read is enabled.

Co-authored-by: ba <ba@ubuntu-server.alpha30.bos16>
Co-authored-by: Zhengchao An <anzhengchao@gmail.com>
This commit is contained in:
rdiperri-wasabi
2026-08-03 14:53:22 -07:00
committed by GitHub
parent 98d3619613
commit de8cb5f26c
5 changed files with 247 additions and 6 deletions
+9
View File
@@ -682,6 +682,15 @@ impl Disk {
Disk::Remote(remote_disk) => remote_disk.enable_health_check(),
}
}
/// Returns the absolute filesystem path for a (volume, path) pair if this
/// disk is local, or `None` if it is a remote disk.
pub fn get_object_path_if_local(&self, volume: &str, path: &str) -> Option<crate::disk::error::Result<std::path::PathBuf>> {
match self {
Disk::Local(w) => Some(w.get_object_path_if_local(volume, path)),
Disk::Remote(_) => None,
}
}
}
pub async fn new_disk(ep: &Endpoint, opt: &DiskOption) -> Result<DiskStore> {