aboutsummaryrefslogtreecommitdiff
path: root/src/block
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-26 18:55:24 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-26 18:55:24 +0100
commit4b978b7533a5899c19d0eecdbd37b629663b6a4b (patch)
tree6bf3fa7cf9ade9f9c2e0a89e3ae0c90bb3e9ec90 /src/block
parent3692af7052f5efbb00b37d363b1c8952c0815519 (diff)
parent911a83ea7d06143c5a9621f88020ab6c0850ba54 (diff)
downloadgarage-4b978b7533a5899c19d0eecdbd37b629663b6a4b.tar.gz
garage-4b978b7533a5899c19d0eecdbd37b629663b6a4b.zip
Merge branch 'main' into next-0.10
Diffstat (limited to 'src/block')
-rw-r--r--src/block/manager.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index 4f3d0978..f4d8ee56 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -348,7 +348,12 @@ impl BlockManager {
}
/// Send block to nodes that should have it
- pub async fn rpc_put_block(&self, hash: Hash, data: Bytes) -> Result<(), Error> {
+ pub async fn rpc_put_block(
+ &self,
+ hash: Hash,
+ data: Bytes,
+ order_tag: Option<OrderTag>,
+ ) -> Result<(), Error> {
let who = self.replication.write_sets(&hash);
let (header, bytes) = DataBlock::from_buffer(data, self.compression_level)
@@ -356,6 +361,11 @@ impl BlockManager {
.into_parts();
let put_block_rpc =
Req::new(BlockRpc::PutBlock { hash, header })?.with_stream_from_buffer(bytes);
+ let put_block_rpc = if let Some(tag) = order_tag {
+ put_block_rpc.with_order_tag(tag)
+ } else {
+ put_block_rpc
+ };
self.system
.rpc_helper()