rework bucket helper functions to use local access where relevant

This commit is contained in:
Alex Auvolat
2025-03-25 13:00:48 +01:00
parent 2c9e849bbf
commit 1e13a66b42
15 changed files with 228 additions and 151 deletions
+9
View File
@@ -482,6 +482,15 @@ impl<F: TableSchema, R: TableReplication> Table<F, R> {
Ok(ret_vec)
}
pub fn get_local(
self: &Arc<Self>,
partition_key: &F::P,
sort_key: &F::S,
) -> Result<Option<F::E>, Error> {
let bytes = self.data.read_entry(partition_key, sort_key)?;
bytes.map(|b| self.data.decode_entry(&b)).transpose()
}
// =============== UTILITY FUNCTION FOR CLIENT OPERATIONS ===============
async fn repair_on_read(&self, who: &[Uuid], what: F::E) -> Result<(), Error> {