mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-28 07:57:01 +00:00
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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user