Repository navigation
Optimize sparse zero detection - #1932
Merged
Merged
Conversation
This was referenced May 1, 2026
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Add CompletionPump: a shared completion-port driver that owns a worker thread looping on GetQueuedCompletionStatusEx and dispatches each completion entry to a per-operation handler keyed by the OVERLAPPED pointer. This is the Windows analogue of an io_uring CQE drain and is the foundational building block for the upcoming batched-write API (#1898), the concurrent file/socket paths (#1928-#1932), and the IOCP benchmark harness (#1899). Existing IocpReader/IocpWriter create a private port and inline-call GetQueuedCompletionStatus per operation, so the pump introduces a process-wide proactor without disturbing those single-op paths. Cross-platform: real implementation lives behind #[cfg(all(target_os = "windows", feature = "iocp"))]; non-Windows targets get an Unsupported-returning stub so the crate still compiles on Linux and macOS. All unsafe stays inside fast_io per the workspace unsafe-code policy.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Add CompletionPump: a shared completion-port driver that owns a worker thread looping on GetQueuedCompletionStatusEx and dispatches each completion entry to a per-operation handler keyed by the OVERLAPPED pointer. This is the Windows analogue of an io_uring CQE drain and is the foundational building block for the upcoming batched-write API (#1898), the concurrent file/socket paths (#1928-#1932), and the IOCP benchmark harness (#1899). Existing IocpReader/IocpWriter create a private port and inline-call GetQueuedCompletionStatus per operation, so the pump introduces a process-wide proactor without disturbing those single-op paths. Cross-platform: real implementation lives behind #[cfg(all(target_os = "windows", feature = "iocp"))]; non-Windows targets get an Unsupported-returning stub so the crate still compiles on Linux and macOS. All unsafe stays inside fast_io per the workspace unsafe-code policy.
This was referenced May 5, 2026
oferchen
added a commit
that referenced
this pull request
May 7, 2026
Document the Windows ERROR_DISK_FULL test plan for the IOCP disk-commit path: VHD-backed limited-capacity volume, fatal error categorisation, completion-port drain on failure, and exit-code mapping to RERR_FILEIO. Mirrors the Linux ENOSPC coverage filed under #1148.
3 tasks done
oferchen
added a commit
that referenced
this pull request
May 17, 2026
Add deterministic disk-full coverage for the Windows IOCP disk-commit path. Real ERROR_DISK_FULL coverage on CI would require provisioning a fixed-size VHD or quota-bounded volume per test; both are heavyweight and flaky on hosted runners. Instead, surface a single-shot fault hook inside `IocpDiskBatch::submit_one_write` that returns a synthetic Win32 error code before any kernel call. The hook is dormant by default (a relaxed AtomicUsize load on the submit path) and exposed as `#[doc(hidden)]` so production callers never see it. The new integration test `crates/fast_io/tests/iocp_disk_full_simulation.rs` is cfg-gated to `windows + iocp`, so it compiles to nothing on Linux and macOS. Cases covered: - std maps Win32 ERROR_DISK_FULL (112) and ERROR_HANDLE_DISK_FULL (39) onto io::ErrorKind::StorageFull on Rust 1.88. - First-submission fault during flush surfaces as StorageFull with the raw OS error intact, matching what the disk-commit thread reaps from a real WriteFile completion. - commit_file fault leaves a prior successfully-committed file on disk intact and lets Drop run cleanly with no panic and no port wedge. - Hook is single-shot: a second batch after the fault writes through end-to-end with no manual reset. - Nth-submission countdown lets the first two 4 KB chunks reach disk before faulting the third, so the file lands at exactly 8 KB.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Document the Windows ERROR_DISK_FULL test plan for the IOCP disk-commit path: VHD-backed limited-capacity volume, fatal error categorisation, completion-port drain on failure, and exit-code mapping to RERR_FILEIO. Mirrors the Linux ENOSPC coverage filed under #1148.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Add deterministic disk-full coverage for the Windows IOCP disk-commit path. Real ERROR_DISK_FULL coverage on CI would require provisioning a fixed-size VHD or quota-bounded volume per test; both are heavyweight and flaky on hosted runners. Instead, surface a single-shot fault hook inside `IocpDiskBatch::submit_one_write` that returns a synthetic Win32 error code before any kernel call. The hook is dormant by default (a relaxed AtomicUsize load on the submit path) and exposed as `#[doc(hidden)]` so production callers never see it. The new integration test `crates/fast_io/tests/iocp_disk_full_simulation.rs` is cfg-gated to `windows + iocp`, so it compiles to nothing on Linux and macOS. Cases covered: - std maps Win32 ERROR_DISK_FULL (112) and ERROR_HANDLE_DISK_FULL (39) onto io::ErrorKind::StorageFull on Rust 1.88. - First-submission fault during flush surfaces as StorageFull with the raw OS error intact, matching what the disk-commit thread reaps from a real WriteFile completion. - commit_file fault leaves a prior successfully-committed file on disk intact and lets Drop run cleanly with no panic and no port wedge. - Hook is single-shot: a second batch after the fault writes through end-to-end with no manual reset. - Nth-submission countdown lets the first two 4 KB chunks reach disk before faulting the third, so the file lands at exactly 8 KB.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Add deterministic disk-full coverage for the Windows IOCP disk-commit path. Real ERROR_DISK_FULL coverage on CI would require provisioning a fixed-size VHD or quota-bounded volume per test; both are heavyweight and flaky on hosted runners. Instead, surface a single-shot fault hook inside `IocpDiskBatch::submit_one_write` that returns a synthetic Win32 error code before any kernel call. The hook is dormant by default (a relaxed AtomicUsize load on the submit path) and exposed as `#[doc(hidden)]` so production callers never see it. The new integration test `crates/fast_io/tests/iocp_disk_full_simulation.rs` is cfg-gated to `windows + iocp`, so it compiles to nothing on Linux and macOS. Cases covered: - std maps Win32 ERROR_DISK_FULL (112) and ERROR_HANDLE_DISK_FULL (39) onto io::ErrorKind::StorageFull on Rust 1.88. - First-submission fault during flush surfaces as StorageFull with the raw OS error intact, matching what the disk-commit thread reaps from a real WriteFile completion. - commit_file fault leaves a prior successfully-committed file on disk intact and lets Drop run cleanly with no panic and no port wedge. - Hook is single-shot: a second batch after the fault writes through end-to-end with no manual reset. - Nth-submission countdown lets the first two 4 KB chunks reach disk before faulting the third, so the file lands at exactly 8 KB.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Document the Windows ERROR_DISK_FULL test plan for the IOCP disk-commit path: VHD-backed limited-capacity volume, fatal error categorisation, completion-port drain on failure, and exit-code mapping to RERR_FILEIO. Mirrors the Linux ENOSPC coverage filed under #1148.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Add deterministic disk-full coverage for the Windows IOCP disk-commit path. Real ERROR_DISK_FULL coverage on CI would require provisioning a fixed-size VHD or quota-bounded volume per test; both are heavyweight and flaky on hosted runners. Instead, surface a single-shot fault hook inside `IocpDiskBatch::submit_one_write` that returns a synthetic Win32 error code before any kernel call. The hook is dormant by default (a relaxed AtomicUsize load on the submit path) and exposed as `#[doc(hidden)]` so production callers never see it. The new integration test `crates/fast_io/tests/iocp_disk_full_simulation.rs` is cfg-gated to `windows + iocp`, so it compiles to nothing on Linux and macOS. Cases covered: - std maps Win32 ERROR_DISK_FULL (112) and ERROR_HANDLE_DISK_FULL (39) onto io::ErrorKind::StorageFull on Rust 1.88. - First-submission fault during flush surfaces as StorageFull with the raw OS error intact, matching what the disk-commit thread reaps from a real WriteFile completion. - commit_file fault leaves a prior successfully-committed file on disk intact and lets Drop run cleanly with no panic and no port wedge. - Hook is single-shot: a second batch after the fault writes through end-to-end with no manual reset. - Nth-submission countdown lets the first two 4 KB chunks reach disk before faulting the third, so the file lands at exactly 8 KB.
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.
Summary
Testing