Scrub persistence decode error #520
Labels
No Label
AdminAPI
Bug
Check AWS
CI
Correctness
Critical
Documentation
Ideas
Improvement
Low priority
Newcomer
Performance
S3 Compatibility
Testing
Usability
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#520
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I appear to have missed a migration step in #516 - after deploying to my nodes, they hit:
last-complete
is epoch, butnext-run
is fine. But I can't see where in the code I can fix this or is it just a case of waiting for the next run and everything will be fine after that?I deleted the file, and restarted the server - it doesn't get recreated, which is the bigger problem if the
next-run
is constantly pushed into the future.I think we don't want to lose info, especially the corruption counter, so we need to make a migration. Here is an example of a datastructure that supports a migration between versions:
https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/model/key_table.rs
Basically, this is what happens :
garage_util::migrate::InitialFormat
garage_util::migrate::Migrate
, where it declaresPrevious
(the struct of the previous version) andmigrate
(the function that transforms the old struct into the new struct)pub use vxxx::*
that makes the new declaration directly usable in all the code (where xxx can be changed to match the latest version when more migrations are made)Would you like to try doing this for the
ScrubWorkerPersisted
data structure, or should I do it myself?For this one, I think you can just call
persister.save()
once when the scrub worker is createdI cannot find a way to easy call this as this is a method of
Persister
and every part of the code seems to instead usePersisterShared
. What should I do?As a hack I think you can do
persister.set_with(|_| ());
, that should do for nowI'd add it here : https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/block/manager.rs#L140