Skip to content

P2-1: Cargo feature gate for disk-offload (~50 KLOC always compiles in) #50

Description

@TinDang97

Disk offload is currently a runtime config (`disk_offload_enabled`), not a Cargo feature. ~50 KLOC of new persistence + tiered storage code therefore compiles into every build, including the tokio CI matrix that does not even run it.

Add `[features] disk-offload = []` and gate:

  • `src/persistence/{checkpoint,manifest,control,page_cache,wal_v3,recovery,kv_page,vec_undo,compression}` (the LZ4 helper from P0-6 stays unconditional)
  • `src/storage/tiered/*`
  • `src/shard/persistence_tick.rs` disk-offload helpers (`run_eviction_tick`, `drain_and_shutdown_spill`, `apply_spill_completions`, `handle_memory_pressure`)
  • The disk-offload init block in `src/shard/event_loop.rs`

Default-on for monoio, default-off when running CI with `--no-default-features --features runtime-tokio,jemalloc` so the tokio matrix verifies the gating actually works (no `#[cfg]` rot).

Plan reference: `.claude/plans/dreamy-whistling-haven.md` §P2-1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions