mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-06 04:47:42 +00:00
scrub: clear saved checkpoint when canceling scrub
This commit is contained in:
@@ -372,6 +372,9 @@ impl ScrubWorker {
|
||||
ScrubWorkerCommand::Cancel => {
|
||||
self.work = match std::mem::take(&mut self.work) {
|
||||
ScrubWorkerState::Running { .. } | ScrubWorkerState::Paused { .. } => {
|
||||
if let Err(e) = self.persister.set_with(|x| x.checkpoint = None) {
|
||||
error!("Could not save scrub checkpoint: {}", e);
|
||||
}
|
||||
ScrubWorkerState::Finished
|
||||
}
|
||||
work => {
|
||||
|
||||
Reference in New Issue
Block a user