diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-19 11:04:20 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-19 13:00:24 +0100 |
commit | fa92046a5d22401b518d3604673190ffa34c2728 (patch) | |
tree | 124216480e2e22b782fb8318d997ac77bd79c17d /src/util/error.rs | |
parent | 0038ca8a78f147b9c0ec07ef0121773aaf110dc9 (diff) | |
download | garage-fa92046a5d22401b518d3604673190ffa34c2728.tar.gz garage-fa92046a5d22401b518d3604673190ffa34c2728.zip |
[block-ref-repair] Block refcount recalculation and repairblock-ref-repair
- We always recalculate the reference count of a block before deleting
it locally, to make sure that it is indeed zero.
- If we had to fetch a remote block but we were not able to get it,
check that refcount is indeed > 0.
- Repair procedure that checks everything
Diffstat (limited to 'src/util/error.rs')
-rw-r--r-- | src/util/error.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/error.rs b/src/util/error.rs index da9eda10..75fd3f9c 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -70,6 +70,9 @@ pub enum Error { #[error(display = "Corrupt data: does not match hash {:?}", _0)] CorruptData(Hash), + #[error(display = "Missing block {:?}: no node returned a valid block", _0)] + MissingBlock(Hash), + #[error(display = "{}", _0)] Message(String), } |