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:
houseme
2026-06-27 01:08:36 +08:00
committed by GitHub
parent e5706ead0e
commit 8994a8ff00
3 changed files with 381 additions and 6 deletions
@@ -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)]