mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-08 13:53:13 +00:00
Merge branch 'main' into next-0.10
This commit is contained in:
+11
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user