Repository navigation
fix(server): pack the store at startup and hourly, not once a day - #244
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.