diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-21 16:05:55 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-21 16:05:55 +0000 |
commit | 2a84d965abc07e4438bd0936dd6cf3307a8a2024 (patch) | |
tree | 4a8f20b05a8911e10cedb9383d0a25969b5b2b27 /src/admin_rpc.rs | |
parent | 0226561035bc90dbf45b993f755b1eee47c8a790 (diff) | |
download | garage-2a84d965abc07e4438bd0936dd6cf3307a8a2024.tar.gz garage-2a84d965abc07e4438bd0936dd6cf3307a8a2024.zip |
Improve table sync
Diffstat (limited to 'src/admin_rpc.rs')
-rw-r--r-- | src/admin_rpc.rs | 34 |
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(()) } } |