#220·lore

Server store compaction destroys repositories and increases disk usage

Author: goldyfruitCreated Sep 21, 2026Updated Sep 21, 2026

We're evaluating Lore as a Perforce replacement and ran into this while testing store GC on v0.10.0 (Linux, local immutable + mutable store, single server, no plugins).

Short version: if the store is bigger than max_size, a compaction pass leaves the repository unresolvable and disk usage goes up.

What I did. Started a server with no caps, pushed a repo, waited past the background flush, cloned it back to confirm it was fine (200/200 files, checksums matched). Then set:

toml
[immutable_store.local]
path = "/data"
max_size = 41943040        # 40 MB, the store had ~178 MB of packfiles
compaction_delay = 15000
target_size_percentage = 70

Restarted and waited for a pass.

The packfiles went from 178,344,518 bytes to 588,739, so the compactor clearly did something. But du -sh /data went from 181M to 259M, and the repo that had cloned fine a minute earlier now fails with Failed to resolve repository.

Looking at the store after: 65,539 files holding 1.8 MB of actual data, spread across ~256 MB of disk. That's one 4 KiB block per tiny file.

Logs confirm the pass ran:

Truncated compacted packfile 1 to zero          (x199)
Packstore compactor evicted 4 fragments, 274780 bytes for group 61

I checked the repo survived a restart right before enabling compaction, and a control run with no caps left it intact, so it's the pass and not the restart.

One thing that made this take a while to pin down: at small scale the compactor just skips (Packstore compactor skipping, current size 1661 is below threshold), so everything looks fine until the store is big enough for it to actually run.