aboutsummaryrefslogtreecommitdiff
path: root/src/garage/repair.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-11 16:54:15 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-11 16:54:15 +0100
commit94f3d287742ff90f179f528421c690b00b71a912 (patch)
tree9269d537da06d609cdc42cba8d9ab3c67d0650b9 /src/garage/repair.rs
parent8d63738cb062e816fc01c6aa2b32936ad31ff65b (diff)
downloadgarage-94f3d287742ff90f179f528421c690b00b71a912.tar.gz
garage-94f3d287742ff90f179f528421c690b00b71a912.zip
WIP big refactoring
Diffstat (limited to 'src/garage/repair.rs')
-rw-r--r--src/garage/repair.rs29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/garage/repair.rs b/src/garage/repair.rs
index e330f7bb..f9cd5884 100644
--- a/src/garage/repair.rs
+++ b/src/garage/repair.rs
@@ -28,38 +28,23 @@ impl Repair {
self.garage
.bucket_table
.syncer
- .load_full()
- .unwrap()
- .add_full_scan()
- .await;
+ .add_full_scan();
self.garage
.object_table
.syncer
- .load_full()
- .unwrap()
- .add_full_scan()
- .await;
+ .add_full_scan();
self.garage
.version_table
.syncer
- .load_full()
- .unwrap()
- .add_full_scan()
- .await;
+ .add_full_scan();
self.garage
.block_ref_table
.syncer
- .load_full()
- .unwrap()
- .add_full_scan()
- .await;
+ .add_full_scan();
self.garage
.key_table
.syncer
- .load_full()
- .unwrap()
- .add_full_scan()
- .await;
+ .add_full_scan();
}
// TODO: wait for full sync to finish before proceeding to the rest?
@@ -93,7 +78,7 @@ impl Repair {
async fn repair_versions(&self, must_exit: &watch::Receiver<bool>) -> Result<(), Error> {
let mut pos = vec![];
- while let Some((item_key, item_bytes)) = self.garage.version_table.store.get_gt(&pos)? {
+ while let Some((item_key, item_bytes)) = self.garage.version_table.data.store.get_gt(&pos)? {
pos = item_key.to_vec();
let version = rmp_serde::decode::from_read_ref::<_, Version>(item_bytes.as_ref())?;
@@ -141,7 +126,7 @@ impl Repair {
async fn repair_block_ref(&self, must_exit: &watch::Receiver<bool>) -> Result<(), Error> {
let mut pos = vec![];
- while let Some((item_key, item_bytes)) = self.garage.block_ref_table.store.get_gt(&pos)? {
+ while let Some((item_key, item_bytes)) = self.garage.block_ref_table.data.store.get_gt(&pos)? {
pos = item_key.to_vec();
let block_ref = rmp_serde::decode::from_read_ref::<_, BlockRef>(item_bytes.as_ref())?;