8000 fix(server): pack the store at startup and hourly, not once a day by kvaps · Pull Request #244 · aenix-io/aeman · GitHub
[go: up one dir, main page]

Skip to content

fix(server): pack the store at startup and hourly, not once a day - #244

Merged
kvaps merged 1 commit into
mainfrom
fix/maintenance-startup-repack
Sep 21, 2026
Merged

kvaps merged 1 commit into
mainfrom
fix/maintenance-startup-repack

Conversation

@kvaps
@kvaps kvaps commented Sep 21, 2026
Copy link
Copy Markdown
Member

On a busy board the server clone grew without bound: go-git never packs on its own, so every commit leaves a loose object and every fetch writes its own pack. Maintenance repacked only on a 24 hour ticker, and a process that restarts on deploy or OOM more often than a day never reaches that first tick, so the store never packs. Once enough loose objects and packs pile up, go-git cannot build a push inside its deadline and the board stops syncing: the commits stay safe in the clone but never leave, and the UI shows "saved locally but not pushed".

A maintenance pass now runs once the initial load settles (startupMaintainDelay) and then every hour instead of once a day, so the store is bounded by one interval of churn however often the process turns over. This changes only when the existing, tested repack runs, not how it packs.

Adds a behavior matrix row (G79) and a server test that the startup pass runs; docs/design/git-backend.md updated.

go-git never packs on its own, so a clone grows an object per commit and a
pack per fetch. Maintenance ran only on a 24h ticker whose first tick a
process that restarts on deploy or OOM more often than a day never
reached, so the store never packed and pushes eventually could not be
built inside their deadline, stranding committed work in the clone. Run a
pass once the initial load settles and every hour instead.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@kvaps
kvaps merged commit 2c6b0af into main Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0