Skip to content

fix(windows): flush binary host views with writable handles - #275

Merged
ORESoftware merged 2 commits into
mainfrom
fix/windows-host-download-sync-20260814
Aug 14, 2026
Merged

fix(windows): flush binary host views with writable handles#275
ORESoftware merged 2 commits into
mainfrom
fix/windows-host-download-sync-20260814

Conversation

@ORESoftware

Copy link
Copy Markdown
Contributor

Why

The Windows portability job on current main passes compilation and reaches the binary host-layout tests, then fails all three materialization tests with Access is denied (os error 5).

The failure occurs before atomic publication in sync_tree_files: Windows FlushFileBuffers rejects the read-only handle returned by File::open.

Fix

Use a write-capable handle only on Windows when calling sync_all. Retain the existing read-only flush path on non-Windows targets.

This does not write or mutate file contents. It only gives the Windows handle the access required to flush the already-written staged file before the existing no-clobber rename.

Validation

Follow-up to #266 and Linear DEN-3495.

Windows FlushFileBuffers rejects read-only file handles. Reopen staged host-view files with write access only on Windows before sync_all, preserving the existing Unix durability path and atomic publication semantics.
@ORESoftware
ORESoftware marked this pull request as ready for review August 14, 2026 19:52
@ORESoftware
ORESoftware merged commit 343c4da into mainAug 14, 2026
29 checks passed
@linear-code

Copy link
Copy Markdown

DEN-3747

Sign up for freeto 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.

1 participant

@ORESoftware