Skip to content

Commit c3ef469

Browse files
committed
sdk/rust: Fix pwrite not flushing buffer before returning
The pwrite implementation was not flushing the file buffer before returning, which could cause data loss since write_all only writes to Tokio's internal buffer. Callers expect data to be persisted when pwrite returns successfully.
1 parent e62c4f1 commit c3ef469

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sdk/rust/src/filesystem/hostfs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ impl FileSystem for HostFS {
131131

132132
file.seek(std::io::SeekFrom::Start(offset)).await?;
133133
file.write_all(data).await?;
134+
file.flush().await?;
134135
Ok(())
135136
}
136137

0 commit comments

Comments
 (0)