You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Epic / tracker. Give the engine first-class storage-capacity awareness: introspect what is stored and how much more fits, gate writes (and compaction) before running out of space without ever breaking an SST, and add an opt-in tight-space compaction mode for embedded / blockchain deployments where the disk is small and "just provision more" is not an option.
Why
Today the engine has no disk-space or quota awareness: no way to ask "how full am I / how much more fits", no admission control, no read-only-on-full, no space-aware compaction. An out-of-space write fails mid-flush; the SST is never corrupted (atomic commit: a partial file is an unreferenced orphan), but liveness breaks (the memtable cannot evict). For small-disk deployments there is also no way to compact when nearly full.
Design invariants
Never start an SST write that cannot finish. Admission control gates before touching disk, so the on-disk format stays intact.
read-only is a computed predicate, not a latched bit:used + reserved > effective_limit, re-evaluated live. Raising the quota (runtime config), freeing disk, or a compaction reclaiming space clears it automatically on the next check — no sticky state to unstick.
No deadlock when full: user writes are gated, but space-reclaiming compaction (Drop / Move / shrinking Merge) keeps an always-available emergency reserve, so the engine can always free space.
Tight-space mode is opt-in. The default path stays simple (separate output file, atomic commit, no journal).
Sequence
Storage introspection API — stats, average K/V shape, remaining-capacity estimate, StorageStatus.
Storage quota + read-only admission control (computed predicate, reserved headroom).
Compaction throttling already exists (Config::compaction_rate_limit / RateLimiter); the tight mode reuses it so reads degrade but never stop during a slow reclaim.
Epic / tracker. Give the engine first-class storage-capacity awareness: introspect what is stored and how much more fits, gate writes (and compaction) before running out of space without ever breaking an SST, and add an opt-in tight-space compaction mode for embedded / blockchain deployments where the disk is small and "just provision more" is not an option.
Why
Today the engine has no disk-space or quota awareness: no way to ask "how full am I / how much more fits", no admission control, no read-only-on-full, no space-aware compaction. An out-of-space write fails mid-flush; the SST is never corrupted (atomic commit: a partial file is an unreferenced orphan), but liveness breaks (the memtable cannot evict). For small-disk deployments there is also no way to compact when nearly full.
Design invariants
used + reserved > effective_limit, re-evaluated live. Raising the quota (runtime config), freeing disk, or a compaction reclaiming space clears it automatically on the next check — no sticky state to unstick.Sequence
StorageStatus.Fs::available_spacedisk-free probe;effective_limit = min(quota, disk_free + used).Compaction throttling already exists (
Config::compaction_rate_limit/RateLimiter); the tight mode reuses it so reads degrade but never stop during a slow reclaim.Child issues are linked below as they are filed.
Child issues
Fs::available_spacefilesystem free-space probe