block/repair.rs: Added migration for ScrubWorkerPersisted's time_next_run_scrub. #523

Merged
lx merged 3 commits from jpds/garage:migrate-scrubworkerpersisted into main 2023-03-10 13:25:02 +00:00
Contributor

Fixes: #520.

Fixes: #520.
jpds changed title from block/repair.rs: Added migration for ScrubWorkerPersisted's time_next_run_scrub. to WIP: block/repair.rs: Added migration for ScrubWorkerPersisted's time_next_run_scrub. 2023-03-09 15:39:35 +00:00
jpds force-pushed migrate-scrubworkerpersisted from 0c5bfe2784 to e77d540b29 2023-03-09 15:41:07 +00:00 Compare
Author
Contributor

@lx Can you please review if this is what you expect from this migration change?

@lx Can you please review if this is what you expect from this migration change?
lx reviewed 2023-03-09 16:04:58 +00:00
lx left a comment
Owner

LGTM, just some minor remarks

LGTM, just some minor remarks
@ -165,0 +187,4 @@
pub(crate) corruptions_detected: u64,
}
//pub use v081::ScrubWorkerPersisted;
Owner

comment can be removed

comment can be removed
jpds marked this conversation as resolved
@ -165,0 +198,4 @@
ScrubWorkerPersisted {
tranquility: old.tranquility,
time_last_complete_scrub: old.time_last_complete_scrub,
time_next_run_scrub: randomize_next_scrub_run_time(),
Owner

Can this be selected by adding the random interval to the old time_last_complete_scrub rather than starting from now? Otherwise the scrub may never happen if the daemon is continuously restarted

Can this be selected by adding the random interval to the old time_last_complete_scrub rather than starting from now? Otherwise the scrub may never happen if the daemon is continuously restarted
Author
Contributor

Yep, I was adding that in now - but wanted to verify that the migration was on the right track :-)

Yep, I was adding that in now - but wanted to verify that the migration was on the right track :-)
Owner

yes it's fine :)

yes it's fine :)
jpds marked this conversation as resolved
jpds force-pushed migrate-scrubworkerpersisted from d3fea59feb to 7b65dd24e2 2023-03-09 16:38:49 +00:00 Compare
jpds added 1 commit 2023-03-09 17:09:20 +00:00
continuous-integration/drone/pr Build is passing Details
d218f475cb
block/manager.rs: Set defaults for scrub_persister.
jpds changed title from WIP: block/repair.rs: Added migration for ScrubWorkerPersisted's time_next_run_scrub. to block/repair.rs: Added migration for ScrubWorkerPersisted's time_next_run_scrub. 2023-03-09 17:09:57 +00:00
Owner

Thanks!

Thanks!
lx merged commit 3325928c13 into main 2023-03-10 13:25:02 +00:00
jpds deleted branch migrate-scrubworkerpersisted 2023-03-10 13:26:03 +00:00
Sign in to join this conversation.
No description provided.