Skip to content

feat(engine): env-var overrides for SpillPolicy (STN-8/9/10) - #4404

Merged
oferchen merged 1 commit into
masterfrom
feature/stn-8-9-10-env-vars
May 18, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/stn-8-9-10-env-vars

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • New module spill/env.rs with apply_env_overrides(&mut SpillPolicy):
    • OC_RSYNC_SPILL_DIR (STN-8) -> dir
    • OC_RSYNC_SPILL_THRESHOLD_BYTES (STN-9) -> threshold_bytes
    • OC_RSYNC_SPILL_COMPRESSION (STN-10) -> compression (parses none|zstd|zstd:N)
  • Invalid values log a tracing::warn! (under the optional tracing feature) and leave the field unchanged. No panics.
  • zstd* values are rejected when the spill-compression feature is off, matching the gated enum variant.
  • New SpillPolicy::from_env() convenience constructor.
  • Wired into DeltaConsumer::spawn_with_config (the single construction site reaching build_spillable) so any caller passing ConcurrentDeltaConfig picks up env overrides automatically.
  • Default behavior (no env vars set) unchanged.

Test plan

  • cargo fmt --all clean
  • Hermetic tests using a module-local EnvGuard plus a Mutex to serialize concurrent threads
  • nextest.toml test-group pins the new env tests to max-threads = 1 as belt-and-suspenders

Closes #2342, closes #2343, closes #2344.

@github-actions github-actions Bot added the enhancement New feature or request label May 18, 2026
@oferchen
oferchen force-pushed the feature/stn-8-9-10-env-vars branch from 4010720 to cf60044 Compare May 18, 2026 00:57
@oferchen
oferchen force-pushed the feature/stn-8-9-10-env-vars branch from cf60044 to 4b085e7 Compare May 18, 2026 01:24
@oferchen
oferchen merged commit dc1dfe0 into master May 18, 2026
3 of 8 checks passed
@oferchen
oferchen deleted the feature/stn-8-9-10-env-vars branch May 19, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant