aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-10 16:21:56 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-10 16:21:56 +0100
commitf319a7d3740ba8b83c9c0eae27edfda1c1d14c03 (patch)
treeefde4606ad33dcf5ad357f82553ad3b07d4a9858 /src/garage
parent6a3dcf39740cda27e61b93582b6fea66991ec4f2 (diff)
downloadgarage-f319a7d3740ba8b83c9c0eae27edfda1c1d14c03.tar.gz
garage-f319a7d3740ba8b83c9c0eae27edfda1c1d14c03.zip
Refactor model stuff, including cleaner CRDTs
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/repair.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/garage/repair.rs b/src/garage/repair.rs
index 297ae9cd..e330f7bb 100644
--- a/src/garage/repair.rs
+++ b/src/garage/repair.rs
@@ -97,7 +97,7 @@ impl Repair {
pos = item_key.to_vec();
let version = rmp_serde::decode::from_read_ref::<_, Version>(item_bytes.as_ref())?;
- if version.deleted {
+ if version.deleted.get() {
continue;
}
let object = self
@@ -127,7 +127,6 @@ impl Repair {
version.bucket,
version.key,
true,
- vec![],
))
.await?;
}
@@ -146,7 +145,7 @@ impl Repair {
pos = item_key.to_vec();
let block_ref = rmp_serde::decode::from_read_ref::<_, BlockRef>(item_bytes.as_ref())?;
- if block_ref.deleted {
+ if block_ref.deleted.get() {
continue;
}
let version = self
@@ -155,7 +154,7 @@ impl Repair {
.get(&block_ref.version, &EmptyKey)
.await?;
let ref_exists = match version {
- Some(v) => !v.deleted,
+ Some(v) => !v.deleted.get(),
None => {
warn!(
"Block ref repair: version for block ref {:?} not found, skipping.",
@@ -174,7 +173,7 @@ impl Repair {
.insert(&BlockRef {
block: block_ref.block,
version: block_ref.version,
- deleted: true,
+ deleted: true.into(),
})
.await?;
}