Skip to content

test(engine): isolated unit tests per SpillPolicy knob (STN-13 #2347) - #4393

Merged
oferchen merged 1 commit into
masterfrom
feature/stn-13-unit-tests-per-knob
May 18, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/stn-13-unit-tests-per-knob

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add one unit test per currently-wired SpillPolicy field, asserting the observable behaviour implied by the knob.
  • threshold_bytes: exact-threshold non-spill, over-threshold spill, zero-budget spill on first insert.
  • dir: override is observed by the buffer, items round-trip through it, directory is created eagerly, recreate-once recovery fires when the override vanishes pre-spill, default None keeps the spooled backend.
  • Knobs not yet wired (reclaim_mode, granularity, compression - STN-4..7) are intentionally not covered.

Test plan

  • cargo fmt --all clean
  • Tests are hermetic (TempDir per FS test)
  • No new dependencies, no clippy waivers

Closes #2347.

@github-actions github-actions Bot added the test label May 18, 2026
@oferchen
oferchen force-pushed the feature/stn-13-unit-tests-per-knob branch from 81a0b71 to 0116729 Compare May 18, 2026 00:57
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
oferchen force-pushed the feature/stn-13-unit-tests-per-knob branch from 0116729 to 159dd99 Compare May 18, 2026 01:17
@oferchen
oferchen merged commit 894489a into master May 18, 2026
3 of 8 checks passed
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
oferchen deleted the feature/stn-13-unit-tests-per-knob branch May 19, 2026 15:09
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant