WIP: block/repair.rs: Initial implementation of scrub checkpointing #582
No reviewers
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#582
Loading…
Reference in a new issue
No description provided.
Delete branch "jpds/garage:scrub-last-hash-persister"
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?
Fixes: #518.
@lx I have tunnel-vision from looking at this code for too long - can you please take a look and tell me what would be the best way to hook the
last_hash
innext()
to thelast_path
?Here is my suggestion:
keep the
next()
function as before, with zero argumentadd to the
BlockStoreIterator
a functionskip_until(hash: Hash)
that reads the root directory, skips until the first subdirectory relevant to the given hash, and then does the same for sub-subdirectoriesOR maybe there's a simpler way of doing it by adding a field
start_at: Hash
in the BlockStoreIterator itself, and then at each time a subdirectory is read,pos
is initialized not to zero but to the first position that is relevant given the hash we want to start at (on the line*last_path = ReadingDir::Read { subpaths, pos: 0 };
)in
ScrubWorker::new
, put something like this:(this will require making the
new
function async and making it return a Result)@ -205,3 +205,3 @@
}
pub use v082::*;
mod v083 {
BTW you do not need to add this whole module with a new migration. Since the value of
last_hash_checked
if it was not present before is itsDefault::default()
value (None
), you can just add it to the struct inv082
with the attribute#[serde(default)]
I will implement this as part of #625, as I am making some changes to the block store iterator for multi-hdd support which incidentally make it much easier to implement checkpointing.
Pull request closed