diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-17 15:36:16 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-17 15:40:13 +0200 |
commit | e41ce4d81528388f043c1c5e6608df45347ea70d (patch) | |
tree | ee25f06b6f7da356c53d5f0a8fc8ec9e81d4bb23 /src/error.rs | |
parent | 867646093b24a9bb7e4b24a7f2248615c6e03fde (diff) | |
download | garage-e41ce4d81528388f043c1c5e6608df45347ea70d.tar.gz garage-e41ce4d81528388f043c1c5e6608df45347ea70d.zip |
Implement getting missing blocks when RC increases
Issue: RC increases also when the block ref entry is first put by the actual client.
At that point the client is probably already sending us the block content,
so we don't need to do a get...
We should add a delay before the task is added or find something to do.
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index c9653f5a..7c648fab 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,6 +2,8 @@ use err_derive::Error; use hyper::StatusCode; use std::io; +use crate::data::Hash; + #[derive(Debug, Error)] pub enum Error { #[error(display = "IO error: {}", _0)] @@ -50,6 +52,9 @@ pub enum Error { #[error(display = "Not found")] NotFound, + #[error(display = "Corrupt data: does not match hash {:?}", _0)] + CorruptData(Hash), + #[error(display = "{}", _0)] Message(String), } |