diff options
author | Alex Auvolat <alex@adnab.me> | 2022-09-02 16:47:15 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-09-02 16:47:15 +0200 |
commit | 47be652a1fe08a8e6dab6aa2c4a41d8eb119f392 (patch) | |
tree | 9e7d1c9513fb6a4727dca8c66e96e61cf693bbd8 /src/block/repair.rs | |
parent | 943d76c583f5740b1d922275a673233a27fe1693 (diff) | |
download | garage-47be652a1fe08a8e6dab6aa2c4a41d8eb119f392.tar.gz garage-47be652a1fe08a8e6dab6aa2c4a41d8eb119f392.zip |
block manager: refactor: split resync into separate file
Diffstat (limited to 'src/block/repair.rs')
-rw-r--r-- | src/block/repair.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/block/repair.rs b/src/block/repair.rs index 18e1de95..e2884b69 100644 --- a/src/block/repair.rs +++ b/src/block/repair.rs @@ -112,7 +112,9 @@ impl Worker for RepairWorker { } for hash in batch_of_hashes.into_iter() { - self.manager.put_to_resync(&hash, Duration::from_secs(0))?; + self.manager + .resync + .put_to_resync(&hash, Duration::from_secs(0))?; self.next_start = Some(hash) } @@ -124,7 +126,9 @@ impl Worker for RepairWorker { // This allows us to find blocks we are storing but don't actually need, // so that we can offload them if necessary and then delete them locally. if let Some(hash) = bi.next().await? { - self.manager.put_to_resync(&hash, Duration::from_secs(0))?; + self.manager + .resync + .put_to_resync(&hash, Duration::from_secs(0))?; Ok(WorkerState::Busy) } else { Ok(WorkerState::Done) |