You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf8be3b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): compact superseded history in the background
Superseded orchestration events (whole-thread state, message and node
updates) accumulated for the lifetime of a database; one install reached
114 GB. compactEventStore existed but nothing in the running server
called it, and SQLite never returned the freed pages to the filesystem.
The new DatabaseStorage service runs compactEventStore six-hourly after
startup and hands freed pages back every minute with incremental_vacuum,
one page per step so client requests interleave. New databases are
created with auto_vacuum = INCREMENTAL; existing files keep their mode
until an offline VACUUM converts them. thread.pull-request-link-updated
joins the compaction rules, keyed by the link's host/repository/number.
No replay boundary is published. Whole-thread events keep only the newest
per thread. Keyed entities (messages, nodes, PR links) keep both their
oldest and newest event: client reducers append an entity where they
first see it, so a replay from any cursor either carries that first event
or finds the entity already present, and ordering survives. thread.deleted
is never compacted because clients switch on the event type. The scan
uses 50-row pages so discovery on the shared connection stays short.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
0 commit comments