Repository navigation
test(fast_io): IOCP high-concurrency stress 10K+ writes (#1871) - #4249
Merged
Merged
Conversation
Add cfg-gated stress coverage for the Windows IOCP disk path. Two opt-in scenarios drive the submission/completion machinery well past typical CI workloads while staying under the 16,384 per-process handle cap: - stress_10k_small_writes_distinct_files: opens 10,000 distinct files in a tempdir and writes a 4 KB payload to each through a single IocpDiskBatch with concurrent_ops = 64. Verifies per-file byte counter, on-disk size, and file count. - stress_10k_alternating_files_via_iocp_writer: keeps 10 IocpWriter handles alive and drives 1,000 write_all(4 KB) calls per file in round-robin order from a single thread. Verifies per-file size and content checksum (in-test FNV-1a, no new dev-deps). Both tests skip with a clear eprintln! unless OC_RSYNC_IOCP_STRESS=1 is set, so the default cargo nextest path stays fast. The file is cfg-gated to windows + iocp and compiles to nothing elsewhere.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Add cfg-gated stress coverage for the Windows IOCP disk path. Two opt-in scenarios drive the submission/completion machinery well past typical CI workloads while staying under the 16,384 per-process handle cap: - stress_10k_small_writes_distinct_files: opens 10,000 distinct files in a tempdir and writes a 4 KB payload to each through a single IocpDiskBatch with concurrent_ops = 64. Verifies per-file byte counter, on-disk size, and file count. - stress_10k_alternating_files_via_iocp_writer: keeps 10 IocpWriter handles alive and drives 1,000 write_all(4 KB) calls per file in round-robin order from a single thread. Verifies per-file size and content checksum (in-test FNV-1a, no new dev-deps). Both tests skip with a clear eprintln! unless OC_RSYNC_IOCP_STRESS=1 is set, so the default cargo nextest path stays fast. The file is cfg-gated to windows + iocp and compiles to nothing elsewhere.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Add cfg-gated stress coverage for the Windows IOCP disk path. Two opt-in scenarios drive the submission/completion machinery well past typical CI workloads while staying under the 16,384 per-process handle cap: - stress_10k_small_writes_distinct_files: opens 10,000 distinct files in a tempdir and writes a 4 KB payload to each through a single IocpDiskBatch with concurrent_ops = 64. Verifies per-file byte counter, on-disk size, and file count. - stress_10k_alternating_files_via_iocp_writer: keeps 10 IocpWriter handles alive and drives 1,000 write_all(4 KB) calls per file in round-robin order from a single thread. Verifies per-file size and content checksum (in-test FNV-1a, no new dev-deps). Both tests skip with a clear eprintln! unless OC_RSYNC_IOCP_STRESS=1 is set, so the default cargo nextest path stays fast. The file is cfg-gated to windows + iocp and compiles to nothing elsewhere.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Add cfg-gated stress coverage for the Windows IOCP disk path. Two opt-in scenarios drive the submission/completion machinery well past typical CI workloads while staying under the 16,384 per-process handle cap: - stress_10k_small_writes_distinct_files: opens 10,000 distinct files in a tempdir and writes a 4 KB payload to each through a single IocpDiskBatch with concurrent_ops = 64. Verifies per-file byte counter, on-disk size, and file count. - stress_10k_alternating_files_via_iocp_writer: keeps 10 IocpWriter handles alive and drives 1,000 write_all(4 KB) calls per file in round-robin order from a single thread. Verifies per-file size and content checksum (in-test FNV-1a, no new dev-deps). Both tests skip with a clear eprintln! unless OC_RSYNC_IOCP_STRESS=1 is set, so the default cargo nextest path stays fast. The file is cfg-gated to windows + iocp and compiles to nothing elsewhere.
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
crates/fast_io/tests/iocp_high_concurrency_stress.rs, cfg-gated towindows + iocpso it compiles to nothing on Linux and macOS.OC_RSYNC_IOCP_STRESS=1. Without the env var the tests print a skip message and return, so defaultcargo nexteststays fast.Scenarios
stress_10k_small_writes_distinct_files: opens 10,000 distinct files in a tempdir and writes a 4 KB payload to each through a singleIocpDiskBatchwithconcurrent_ops = 64. Asserts per-file byte counter, on-disk size, and total file count.stress_10k_alternating_files_via_iocp_writer: keeps 10IocpWriterhandles alive and drives 1,000write_all(4 KB)calls per file in round-robin order from a single thread. Asserts per-file size and a content checksum (in-test FNV-1a, no new dev-deps).Test plan
OC_RSYNC_IOCP_STRESS=1 cargo nextest run -p fast_io --features iocp -E 'test(stress_)'passes, both files land at the expected size, and no handle/sharing errors surface.cargo nextest run -p fast_iorun on Windows skips both tests with the expectedeprintln!message.