Repository navigation
fix: eliminate port TOCTOU race in daemon integration tests - #2347
Merged
Merged
Conversation
Replace manual port allocation (bind-check-drop-rebind) with OS ephemeral port assignment (port 0). The kernel picks a free port and avoids immediate recycling, minimizing the race window. Also add integration_daemon_server to the nextest CI retry policy.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
fix: eliminate port TOCTOU race in daemon integration tests
oferchen
added a commit
that referenced
this pull request
May 5, 2026
fix: eliminate port TOCTOU race in daemon integration tests
3 tasks done
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Cover the SpillPolicy fields whose runtime behaviour is wired today: - threshold_bytes: spill stays off at exactly the threshold, engages on the first byte over, and engages immediately on a zero budget. - dir: the override path is observed by the buffer, items round-trip through it, the directory is created eagerly, the recreate-once recovery path fires when the override vanishes pre-spill, and the default `None` keeps the spooled backend. The remaining knobs (reclaim_mode, granularity, compression) are placeholders for STN-4..7 and have no observable runtime effect yet, so no tests are emitted for them here. Tests are hermetic (TempDir per FS test) and live in a new submodule crates/engine/src/concurrent_delta/spill/tests_per_knob.rs.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Cover the SpillPolicy fields whose runtime behaviour is wired today: - threshold_bytes: spill stays off at exactly the threshold, engages on the first byte over, and engages immediately on a zero budget. - dir: the override path is observed by the buffer, items round-trip through it, the directory is created eagerly, the recreate-once recovery path fires when the override vanishes pre-spill, and the default `None` keeps the spooled backend. The remaining knobs (reclaim_mode, granularity, compression) are placeholders for STN-4..7 and have no observable runtime effect yet, so no tests are emitted for them here. Tests are hermetic (TempDir per FS test) and live in a new submodule crates/engine/src/concurrent_delta/spill/tests_per_knob.rs.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#4393) Cover the SpillPolicy fields whose runtime behaviour is wired today: - threshold_bytes: spill stays off at exactly the threshold, engages on the first byte over, and engages immediately on a zero budget. - dir: the override path is observed by the buffer, items round-trip through it, the directory is created eagerly, the recreate-once recovery path fires when the override vanishes pre-spill, and the default `None` keeps the spooled backend. The remaining knobs (reclaim_mode, granularity, compression) are placeholders for STN-4..7 and have no observable runtime effect yet, so no tests are emitted for them here. Tests are hermetic (TempDir per FS test) and live in a new submodule crates/engine/src/concurrent_delta/spill/tests_per_knob.rs.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#4393) Cover the SpillPolicy fields whose runtime behaviour is wired today: - threshold_bytes: spill stays off at exactly the threshold, engages on the first byte over, and engages immediately on a zero budget. - dir: the override path is observed by the buffer, items round-trip through it, the directory is created eagerly, the recreate-once recovery path fires when the override vanishes pre-spill, and the default `None` keeps the spooled backend. The remaining knobs (reclaim_mode, granularity, compression) are placeholders for STN-4..7 and have no observable runtime effect yet, so no tests are emitted for them here. Tests are hermetic (TempDir per FS test) and live in a new submodule crates/engine/src/concurrent_delta/spill/tests_per_knob.rs.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#4393) Cover the SpillPolicy fields whose runtime behaviour is wired today: - threshold_bytes: spill stays off at exactly the threshold, engages on the first byte over, and engages immediately on a zero budget. - dir: the override path is observed by the buffer, items round-trip through it, the directory is created eagerly, the recreate-once recovery path fires when the override vanishes pre-spill, and the default `None` keeps the spooled backend. The remaining knobs (reclaim_mode, granularity, compression) are placeholders for STN-4..7 and have no observable runtime effect yet, so no tests are emitted for them here. Tests are hermetic (TempDir per FS test) and live in a new submodule crates/engine/src/concurrent_delta/spill/tests_per_knob.rs.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…#4393) Cover the SpillPolicy fields whose runtime behaviour is wired today: - threshold_bytes: spill stays off at exactly the threshold, engages on the first byte over, and engages immediately on a zero budget. - dir: the override path is observed by the buffer, items round-trip through it, the directory is created eagerly, the recreate-once recovery path fires when the override vanishes pre-spill, and the default `None` keeps the spooled backend. The remaining knobs (reclaim_mode, granularity, compression) are placeholders for STN-4..7 and have no observable runtime effect yet, so no tests are emitted for them here. Tests are hermetic (TempDir per FS test) and live in a new submodule crates/engine/src/concurrent_delta/spill/tests_per_knob.rs.
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
integration_daemon_serverbinary to the nextest CI retry policy (was only coveringpackage(daemon))Root cause
nextest runs each test as a separate process. The old
allocate_test_port()used PID-based port ranges with an atomic counter, but close PIDs from nextest forks could map to overlapping ranges. The bind-check-drop pattern left a window for port theft.Test plan
cargo clippycleancargo fmtclean