diff options
author | Alex Auvolat <alex@adnab.me> | 2023-11-14 14:28:16 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-11-14 14:28:16 +0100 |
commit | 3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea (patch) | |
tree | f5448d44c7d5705c1e31912ca6d101c5998523ef /src/table/table.rs | |
parent | 866196750fca74c1911ade2a90611f3663e60046 (diff) | |
download | garage-3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea.tar.gz garage-3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea.zip |
layout: prepare for write sets
Diffstat (limited to 'src/table/table.rs')
-rw-r--r-- | src/table/table.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/table/table.rs b/src/table/table.rs index 997fd7dc..bf08d5a0 100644 --- a/src/table/table.rs +++ b/src/table/table.rs @@ -119,7 +119,8 @@ impl<F: TableSchema, R: TableReplication> Table<F, R> { async fn insert_internal(&self, e: &F::E) -> Result<(), Error> { let hash = e.partition_key().hash(); - let who = self.data.replication.write_nodes(&hash); + // TODO: use write sets + let who = self.data.replication.storage_nodes(&hash); let e_enc = Arc::new(ByteBuf::from(e.encode()?)); let rpc = TableRpc::<F>::Update(vec![e_enc]); @@ -171,7 +172,8 @@ impl<F: TableSchema, R: TableReplication> Table<F, R> { for entry in entries.into_iter() { let entry = entry.borrow(); let hash = entry.partition_key().hash(); - let who = self.data.replication.write_nodes(&hash); + // TODO: use write sets + let who = self.data.replication.storage_nodes(&hash); let e_enc = Arc::new(ByteBuf::from(entry.encode()?)); for node in who { call_list.entry(node).or_default().push(e_enc.clone()); |