pub struct LiveRuntimeConfig {
pub appendfsync: Option<Fsync>,
pub auto_aof_rewrite_pct: Option<u32>,
pub auto_aof_rewrite_bytes: Option<u64>,
pub auto_aof_rewrite_interval_secs: Option<u64>,
pub auto_aof_rewrite_min_size: Option<u64>,
pub tick_interval_ms: Option<u64>,
pub notify_flags: Option<NotificationFlags>,
pub slowlog_slower_than_micros: Option<i64>,
pub slowlog_max_len: Option<u32>,
pub promotion_epoch: u64,
}Expand description
Live snapshot of the runtime-owned knobs that may have been changed
since this shard’s last tick. Built by the Commands impl from
its own config source (e.g. kevy reads config_global). Each
Some(_) is applied to the shard; each None leaves the existing
setting alone.
One snapshot is built per tick (every 100 ms by default), so its cost is amortised across thousands of commands.
Fields§
§appendfsync: Option<Fsync>AOF fsync policy. Applied via Aof::set_fsync — switching to
Always mid-flight also flushes any buffered bytes so the new
“every write is on disk before reply” contract is honoured from
the next append onward.
auto_aof_rewrite_pct: Option<u32>auto_aof_rewrite_percentage. 0 disables the auto-trigger.
auto_aof_rewrite_bytes: Option<u64>Absolute-size auto-rewrite trigger in bytes (0 = rule off).
auto_aof_rewrite_interval_secs: Option<u64>Time-based auto-rewrite trigger in seconds (0 = rule off).
auto_aof_rewrite_min_size: Option<u64>auto_aof_rewrite_min_size in bytes.
tick_interval_ms: Option<u64>New tick interval in ms (1000/hz). 0 disables ticking
entirely — note that disabling also turns off active TTL
expiry and the auto-rewrite tick path. Lazy expiry on access
always still works.
notify_flags: Option<NotificationFlags>notify_keyspace_events flags. Parsed by the Commands
impl from its config source (e.g. kevy reads
config_global + kevy_config::parse_notification_flags).
Default-empty flags mean OFF — writes pay one bool-OR check
and skip every per-key keyspace notification publish.
slowlog_slower_than_micros: Option<i64>[slowlog].slower_than_micros — -1 disables, 0 records all,
>0 is the strict micros threshold. None keeps the existing
shard setting (set by the Runtime builder at startup).
slowlog_max_len: Option<u32>[slowlog].max_len — ring cap per shard. Shrinking trims the
oldest entries on the next tick application.
promotion_epoch: u64Monotonic promotion counter. The command layer bumps
it every time this process is PROMOTED (replica → primary:
REPLICAOF NO ONE on a following replica, or an election win).
Each shard tracks the last value it saw; an increase makes the
shard bump its feed generation (offsets restart at 0, persisted
via the feed-gen sidecar) — so a REPL.TOKEN minted before the
failover can never falsely satisfy a REPL.WAIT against the new
primary’s unrelated offset space. Not an Option: 0 (the
default) means “never promoted” and embedders pay nothing.
Trait Implementations§
Source§impl Clone for LiveRuntimeConfig
impl Clone for LiveRuntimeConfig
Source§fn clone(&self) -> LiveRuntimeConfig
fn clone(&self) -> LiveRuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more