Small refactor of tables internals

This commit is contained in:
Alex Auvolat
2022-12-14 10:48:49 +01:00
parent d1279e04f3
commit f8e528c15d
3 changed files with 24 additions and 29 deletions
+1 -6
View File
@@ -273,14 +273,9 @@ impl K2VRpcHandler {
}
fn local_insert(&self, item: &InsertedItem) -> Result<Option<K2VItem>, Error> {
let tree_key = self
.item_table
.data
.tree_key(&item.partition, &item.sort_key);
self.item_table
.data
.update_entry_with(&tree_key[..], |ent| {
.update_entry_with(&item.partition, &item.sort_key, |ent| {
let mut ent = ent.unwrap_or_else(|| {
K2VItem::new(
item.partition.bucket_id,