Skip to content

Conversation

@penberg
Copy link
Collaborator

@penberg penberg commented Dec 22, 2025

Let's call flush() after write_all() to be safe. It's unclear to me if this explains a hostfs test failure I saw, but Tokio's documentation suggests that a write_all() returns when the write is handed over to the thread pool, but makes no guarantees that the write actually is done, meaning a subsequent read might return state data.

@penberg penberg changed the title sdk/rust: Fix pwrite not flushing buffer before returning sdk/rust: Fix pwrite to flushing buffer before returning Dec 22, 2025
Let's call flush() after write_all() to be safe. It's unclear to me if
this explains a hostfs test failure I saw, but Tokio's documentation
suggests that a write_all() returns when the write is handed over to the
thread pool, but makes no guarantees that the write actually is done,
meaning a subsequent read might return state data.
@penberg penberg merged commit d0da256 into main Dec 22, 2025
33 checks passed
@penberg penberg deleted the fix-pwrite-flush branch December 22, 2025 13:28
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.

2 participants