Retry data writes that return an IO error#1915
Merged
jmpesp merged 3 commits intooxidecomputer:mainfrom Mar 31, 2026
Merged
Conversation
The downstairs should retry all the extent file modifications that are part of a higher level Crucible write until they succeed. Fix a bug where this does not occur for data writes, and add a test to validate the fix.
mkeeter
reviewed
Mar 31, 2026
mkeeter
reviewed
Mar 31, 2026
mkeeter
reviewed
Mar 31, 2026
| /// For testing purposes, change this field to simulate the pwrite | ||
| /// responsible for writing out the block data succeeding or failing based | ||
| /// on some configuration. | ||
| #[cfg(test)] |
Contributor
There was a problem hiding this comment.
I don't love putting (even test-gated) debug shenanigans into this struct, but until we live in a world with mockable IO abstractions, I guess it's fine...
leftwo
approved these changes
Mar 31, 2026
| /// responsible for writing out the block data succeeding or failing based | ||
| /// on some configuration. | ||
| #[cfg(test)] | ||
| simulate_data_write_error: |
Contributor
There was a problem hiding this comment.
I'm not in love with the test code being stuffed in here like this, but I can't think of a better way to get the coverage we want from this.
Are we sure that when we compile, we won't get this struct in the release image?
This file contains hidden or 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
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.
The downstairs should retry all the extent file modifications that are part of a higher level Crucible write until they succeed. Fix a bug where this does not occur for data writes, and add a test to validate the fix.