aboutsummaryrefslogtreecommitdiff
path: root/src/block.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-19 17:15:48 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-19 17:15:48 +0200
commita6129d8626f5b87462b70eadbce2db08c9761cfd (patch)
tree7e0e0d348bc8f8672db57680f8aeedf9c6c03523 /src/block.rs
parent302502f4c10b4c1cd03d3b098b3e55a3f70054f2 (diff)
downloadgarage-a6129d8626f5b87462b70eadbce2db08c9761cfd.tar.gz
garage-a6129d8626f5b87462b70eadbce2db08c9761cfd.zip
Begin implement bucket management & admin commands
Diffstat (limited to 'src/block.rs')
-rw-r--r--src/block.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block.rs b/src/block.rs
index d7daea01..c84f193b 100644
--- a/src/block.rs
+++ b/src/block.rs
@@ -98,7 +98,7 @@ impl BlockManager {
Message::NeedBlockQuery(h) => {
self2.need_block(&h).await.map(Message::NeedBlockReply)
}
- _ => Err(Error::Message(format!("Invalid RPC"))),
+ _ => Err(Error::BadRequest(format!("Unexpected RPC message"))),
}
}
});
@@ -262,7 +262,7 @@ impl BlockManager {
let garage = self.garage.load_full().unwrap();
let active_refs = garage
.block_ref_table
- .get_range(&hash, &[0u8; 32].into(), Some(()), 1)
+ .get_range(&hash, None, Some(()), 1)
.await?;
let needed_by_others = !active_refs.is_empty();
if needed_by_others {