-
Notifications
You must be signed in to change notification settings - Fork 42
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
Region snapshot replacement for read-only regions #7435
Open
jmpesp
wants to merge
20
commits into
oxidecomputer:main
Choose a base branch
from
jmpesp:replace_read_only_regions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,113
−452
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
Reuse the region snapshot replacement machinery to replace read-only regions. This is done by storing a replacement type in the region snapshot replacement record such that either a region snapshot _or_ a read-only region can be the subject of this type of replacement. The procedure for both types is the same so all the code can be reused. A future commit will rename region snapshot replacement (and all references) to "read-only target replacement" to reflect that the machinery now applies to both region snapshots and read-only regions. This will be a mostly mechanical set of changes that can be reviewed separately with much less scrutiny. Right now manually requesting a region replacement with omdb is done through the region replacement manual request, not the region snapshot replacement manual request. This will change in that future commit to be part of a read-only target replacement request.
leftwo
reviewed
Feb 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks pretty good, just some general questions.
I've been replacing read only regions in snapshots for about a week now, no issues found.
nexus/src/app/background/tasks/region_snapshot_replacement_garbage_collect.rs
Outdated
Show resolved
Hide resolved
addresses test flake due to slow systems being at the start of execution, then bailing out of the wait for condition, then querying for the state and seeing that it's in the middle of execution
I set every poll interval related to the background task and crucible polling to 500 milliseconds, and this is way too long for computers. Cut that by 10 to 50 milliseconds. Also, more `wait_for_all_replacements` calls to make sure replacement tasks are finished. This should address timeout test flakes in CI.
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.
Reuse the region snapshot replacement machinery to replace read-only regions. This is done by storing a replacement type in the region snapshot replacement record such that either a region snapshot or a read-only region can be the subject of this type of replacement. The procedure for both types is the same so all the code can be reused.
A future commit will rename region snapshot replacement (and all references) to "read-only target replacement" to reflect that the machinery now applies to both region snapshots and read-only regions. This will be a mostly mechanical set of changes that can be reviewed separately with much less scrutiny. Right now manually requesting a region replacement with omdb is done through the region replacement manual request, not the region snapshot replacement manual request. This will change in that future commit to be part of a read-only target replacement request.
Fixes #6172