mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-27 15:37:03 +00:00
block manager: avoid incorrect data_dir configs and avoid losing files
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user