pub struct StoreConfig {
pub durability: Option<DurabilityTier>,
pub volume: Option<String>,
pub evict_after: Option<u64>,
pub retention_class: Option<RetentionClass>,
pub compression: Option<bool>,
pub flush_interval_ms: Option<u64>,
}Expand description
@store directive — storage-engine axis.
Bare @store (no args) inherits all defaults. Each field is
optional; omitted fields fall back to platform defaults.
Fields§
§durability: Option<DurabilityTier>@store(durability: ...). None = platform default
(currently Soft for user data; Strong for system
databases like yeti-auth, yeti-queue).
volume: Option<String>@store(volume: ...). None = use the app’s default volume.
When set: if the value starts with / or contains ://,
treat as a literal path/URL; otherwise resolve through
yeti-config.yaml storage.volumes. Reserved value
"adaptive" is parsed but rejected at backend open until
Ships adaptive-tier storage.
evict_after: Option<u64>@store(evictAfter: N) — seconds before a record is evicted.
Replaces the older @table(expiration: N) arg.
When @store(class:) is set, the loader resolves the class to
its canonical window (see RetentionClass::evict_after_secs)
and stores the result here, so every downstream consumer reads a
single evict_after seconds value regardless of how the schema
expressed retention. Declaring both class and a raw
evictAfter is a schema error — the two are mutually exclusive.
retention_class: Option<RetentionClass>@store(class: "hot|warm|audit-archive") — the named retention
class this table opted into, if any. Kept alongside the
resolved Self::evict_after so tooling can report the operator’s
declared intent, not just the derived seconds.
compression: Option<bool>@store(compression: bool) — per-table override of the
deployment-wide compression setting.
flush_interval_ms: Option<u64>@store(flushIntervalMs: N) — bounded crash-loss window in ms.
Provides a fourth point on the durability scale
between lossy (~minutes) and soft (~seconds): periodic
fsync() of the WAL every N ms. Mutually exclusive with
durability: "strong" (already fsync-per-write) and
durability: "lossy" (no WAL to fsync). Runtime wiring to
RocksDB’s wal_bytes_per_sync / background SyncWAL is
deferred — this commit lands the directive surface so schemas
can declare it.
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more