aboutsummaryrefslogtreecommitdiff
path: root/src/block/manager.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-09-06 17:49:30 +0200
committerAlex Auvolat <alex@adnab.me>2023-09-06 17:49:30 +0200
commitf38a31b3304726aa7c890ba1a9f7a3e67b11bc60 (patch)
tree534491a345cba84f44b32c256982eff6ad6284ac /src/block/manager.rs
parente30865984a5f23f046396ca192c1930314b50115 (diff)
downloadgarage-f38a31b3304726aa7c890ba1a9f7a3e67b11bc60.tar.gz
garage-f38a31b3304726aa7c890ba1a9f7a3e67b11bc60.zip
block manager: avoid incorrect data_dir configs and avoid losing files
Diffstat (limited to 'src/block/manager.rs')
-rw-r--r--src/block/manager.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs
index b42a9aa9..eb498be0 100644
--- a/src/block/manager.rs
+++ b/src/block/manager.rs
@@ -279,16 +279,20 @@ impl BlockManager {
let res = match res {
Ok(res) => res,
Err(e) => {
- debug!("Get block {:?}: node {:?} returned error: {}", hash, node, e);
+ debug!("Get block {:?}: node {:?} could not be contacted: {}", hash, node, e);
continue;
}
};
let (header, stream) = match res.into_parts() {
(Ok(BlockRpc::PutBlock { hash: _, header }), Some(stream)) => (header, stream),
- _ => {
+ (Ok(_), _) => {
debug!("Get block {:?}: node {:?} returned a malformed response", hash, node);
continue;
}
+ (Err(e), _) => {
+ debug!("Get block {:?}: node {:?} returned error: {}", hash, node, e);
+ continue;
+ }
};
match f(header, stream).await {
Ok(ret) => return Ok(ret),