-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store backfill_processes status for protection against interruptions #29
Merged
danyalprout
merged 12 commits into
base-org:master
from
bitwiseguy:ss/finish-old-backfills
Jun 21, 2024
Merged
Store backfill_processes status for protection against interruptions #29
danyalprout
merged 12 commits into
base-org:master
from
bitwiseguy:ss/finish-old-backfills
Jun 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danyalprout
reviewed
Jun 18, 2024
bitwiseguy
force-pushed
the
ss/finish-old-backfills
branch
from
June 19, 2024 04:08
52db9f5
to
2437e3b
Compare
bitwiseguy
commented
Jun 21, 2024
danyalprout
reviewed
Jun 21, 2024
danyalprout
approved these changes
Jun 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There is currently a failure mode where if the blob-archiver gets restarted before a backfill process completes, there is a gap in blob slots stored that will go undetected unless there is an external tool (i.e. blob-validator) running to catch the missing slots.
This PR introduces a
backfill_processes
file/object that is stored in persistent memory (either s3 or a file). That object contains information about any ongoing backfill processes so that they will be resumed during the blob-archiver startup routine. This reduces the dependence on external tools.This change is meant to be backward compatible with existing blob-archivers.
Additional context
Changes made:
storage.WriteBackfillProcesses
methodstorage.ReadBackfillProcesses
methodstorage.Write
-->storage.WriteBlobs
to distinguish from the newstorage.WriteBackfillProcesses
storage.Read
-->storage.ReadBlobs
to distinguish from the newstorage.ReadBackfillProcesses
TestArchiver_BackfillFinishOldProcess
backfill_processes
file/object does not exist, it will create an empty onearchiver.backfillBlobs
method to utilize the new storage methods and loop through all new and old backfill processes, completing them one-by-one. When all processes are completed, the content in thebackfill_processes
file in storage should just be an empty mappingOpen questions
backfill_processes
functionality be hidden behind a feature flag and remain off-by-default?backfill_processes
are completed is not based on the slot number (i.e. the highest or lowest slot number is not what determines which process is done first)? Rather, the hash of the block header and its order in a mapping is what determines the order of processing.