Skip to content

Retry data writes that return an IO error#1915

Merged
jmpesp merged 3 commits intooxidecomputer:mainfrom
jmpesp:retry_interrupted_data_writes
Mar 31, 2026
Merged

Retry data writes that return an IO error#1915
jmpesp merged 3 commits intooxidecomputer:mainfrom
jmpesp:retry_interrupted_data_writes

Conversation

@jmpesp
Copy link
Copy Markdown
Contributor

@jmpesp jmpesp commented Mar 31, 2026

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.

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.
@jmpesp jmpesp requested a review from leftwo March 31, 2026 18:07
@jmpesp jmpesp added this to the 19 milestone 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)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

/// responsible for writing out the block data succeeding or failing based
/// on some configuration.
#[cfg(test)]
simulate_data_write_error:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@jmpesp jmpesp merged commit ae1da83 into oxidecomputer:main Mar 31, 2026
17 checks passed
@jmpesp jmpesp deleted the retry_interrupted_data_writes branch March 31, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants