aboutsummaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-14 14:28:16 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-14 14:28:16 +0100
commit3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea (patch)
treef5448d44c7d5705c1e31912ca6d101c5998523ef /src/block
parent866196750fca74c1911ade2a90611f3663e60046 (diff)
downloadgarage-3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea.tar.gz
garage-3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea.zip
layout: prepare for write sets
Diffstat (limited to 'src/block')
-rw-r--r--src/block/manager.rs3
-rw-r--r--src/block/resync.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index 72b4ea66..2bb9c23d 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -354,7 +354,8 @@ impl BlockManager {
/// Send block to nodes that should have it
pub async fn rpc_put_block(&self, hash: Hash, data: Bytes) -> Result<(), Error> {
- let who = self.replication.write_nodes(&hash);
+ // TODO: use quorums among latest write set
+ let who = self.replication.storage_nodes(&hash);
let (header, bytes) = DataBlock::from_buffer(data, self.compression_level)
.await
diff --git a/src/block/resync.rs b/src/block/resync.rs
index fedcd6f5..122d0142 100644
--- a/src/block/resync.rs
+++ b/src/block/resync.rs
@@ -377,7 +377,7 @@ impl BlockResyncManager {
info!("Resync block {:?}: offloading and deleting", hash);
let existing_path = existing_path.unwrap();
- let mut who = manager.replication.write_nodes(hash);
+ let mut who = manager.replication.storage_nodes(hash);
if who.len() < manager.replication.write_quorum() {
return Err(Error::Message("Not trying to offload block because we don't have a quorum of nodes to write to".to_string()));
}