mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
feat(get): add local-first shard reads (#3924)
* feat(get): observe shard locality cost * feat(get): add local-first shard reads ---- Co-Authored-By: Heihutu <heihutu@gmail.com>
This commit is contained in:
@@ -38,6 +38,9 @@ impl ShardReadCost {
|
||||
pub(crate) const fn is_low_cost(self) -> bool {
|
||||
matches!(self, Self::Local | Self::SameNode)
|
||||
}
|
||||
pub(crate) const fn is_remote(self) -> bool {
|
||||
matches!(self, Self::Remote)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
||||
Reference in New Issue
Block a user