diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-17 19:16:08 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-17 19:16:08 +0200 |
commit | 4abfb75509f216f4d62bc8b18b22eb680eefe2d9 (patch) | |
tree | cf70746c4348cd6523ee11679e35c55f28aea7ba /src/rpc_server.rs | |
parent | db1c4222cefa99c6a4453da13bdb4f206b4b05a5 (diff) | |
download | garage-4abfb75509f216f4d62bc8b18b22eb680eefe2d9.tar.gz garage-4abfb75509f216f4d62bc8b18b22eb680eefe2d9.zip |
Implement sending blocks to nodes that need them
Diffstat (limited to 'src/rpc_server.rs')
-rw-r--r-- | src/rpc_server.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rpc_server.rs b/src/rpc_server.rs index c473a32d..3410ab97 100644 --- a/src/rpc_server.rs +++ b/src/rpc_server.rs @@ -66,6 +66,11 @@ async fn handler( tokio::spawn(write_fut).await? } Message::GetBlock(h) => garage.block_manager.read_block(&h).await, + Message::NeedBlockQuery(h) => garage + .block_manager + .need_block(&h) + .await + .map(Message::NeedBlockReply), Message::TableRPC(table, msg) => { // Same trick for table RPCs than for PutBlock |