scrub: clear saved checkpoint when canceling scrub
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Alex 2023-09-11 12:10:48 +02:00
parent 7f9ba49c71
commit 9526328d38
1 changed files with 3 additions and 0 deletions

View File

@ -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 => {