Server store eviction is reference-blind: max_capacity deletes live repository data
Found this on v0.10.0 while looking at how to reclaim space on a self-hosted server (Linux, local immutable + mutable store).
max_capacity evicts by last access and capacity with no notion of reachability, so on a server it deletes fragments that live repositories still need.
Repro. Server with no caps, push a small repo (10 files), wait past the flush, restart, clone it back to confirm the data is durable — 10/10 files. Then:
[immutable_store.local]
path = "/data"
max_capacity = 5
eviction_delay = 10000
target_capacity_percentage = 70Restart, wait for a pass:
Store evictor enforcing max capacity of 5
Evicted 13 of 13 fragments from 13 buckets across 13 groups
Evicted 7 of 7 fragments from 7 buckets across 7 groupsClone now gives Not found, 0 of 10 files. Same repo cloned 10/10 immediately before, and a control restart with no caps left it intact, so eviction is the only thing that changed.
Makes sense from the code — evict_oldest / evict_oldest_bucket rank by last access against a capacity target, and nothing looks at what a revision references. That's fine for a client cache where you can re-fetch, but on a server the store is the source of truth.
Would it make sense to reject max_capacity on a server-mode store, or document it as client-only? Right now it's reachable straight from server config and quietly eats data.
Somewhat related, in case it's useful: maintenance.rs::evictor raises whatever you configure to a floor of 1024 * 1024 entries, which is probably why this doesn't bite more often. But it's silent (configure 500, it enforces 1048576, nothing says so), and the load-triggered path in GcCounters applies no floor at all, so the two paths disagree about the same setting.
Source: EpicGames/lore