Skip to main content

MAX_ENTRIES

Constant MAX_ENTRIES 

Source
pub const MAX_ENTRIES: u64 = 100_000;
Expand description

Hard upper bound on rows retained in the activity log.

Why: prevents the activity log from growing without bound on a long-lived daemon. ~100k rows × ~256 B per row keeps the on-disk footprint at roughly 25 MB even in the worst case, which is the right trade-off for a dashboard time-series — older events fall off via FIFO eviction. What: append-time eviction deletes rows in ascending-id order until the table is at or below this cap. Test: appends_evict_oldest_when_capped.