Scrub persistence decode error #520
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#520
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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