aboutsummaryrefslogtreecommitdiff
path: root/src/admin_rpc.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-21 16:05:55 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-21 16:05:55 +0000
commit2a84d965abc07e4438bd0936dd6cf3307a8a2024 (patch)
tree4a8f20b05a8911e10cedb9383d0a25969b5b2b27 /src/admin_rpc.rs
parent0226561035bc90dbf45b993f755b1eee47c8a790 (diff)
downloadgarage-2a84d965abc07e4438bd0936dd6cf3307a8a2024.tar.gz
garage-2a84d965abc07e4438bd0936dd6cf3307a8a2024.zip
Improve table sync
Diffstat (limited to 'src/admin_rpc.rs')
-rw-r--r--src/admin_rpc.rs34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/admin_rpc.rs b/src/admin_rpc.rs
index 0e9d2338..412c44b7 100644
--- a/src/admin_rpc.rs
+++ b/src/admin_rpc.rs
@@ -194,6 +194,37 @@ impl AdminRpcHandler {
}
async fn repair_worker(self: Arc<Self>, must_exit: watch::Receiver<bool>) -> Result<(), Error> {
+ self.garage
+ .bucket_table
+ .syncer
+ .load_full()
+ .unwrap()
+ .add_full_scan()
+ .await;
+ self.garage
+ .object_table
+ .syncer
+ .load_full()
+ .unwrap()
+ .add_full_scan()
+ .await;
+ self.garage
+ .version_table
+ .syncer
+ .load_full()
+ .unwrap()
+ .add_full_scan()
+ .await;
+ self.garage
+ .block_ref_table
+ .syncer
+ .load_full()
+ .unwrap()
+ .add_full_scan()
+ .await;
+
+ // TODO: wait for full sync to finish before proceeding to the rest?
+
self.repair_versions(&must_exit).await?;
self.repair_block_ref(&must_exit).await?;
self.repair_rc(&must_exit).await?;
@@ -297,8 +328,9 @@ impl AdminRpcHandler {
Ok(())
}
- async fn repair_rc(&self, must_exit: &watch::Receiver<bool>) -> Result<(), Error> {
+ async fn repair_rc(&self, _must_exit: &watch::Receiver<bool>) -> Result<(), Error> {
// TODO
+ warn!("repair_rc: not implemented");
Ok(())
}
}