mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 02:47:34 +00:00
Streamed replies stored a whole-message record per revision, and nothing removed the superseded ones: on a long-lived profile item records reached 884 MB, and one week-old chat held 26k item records for 13.7k messages. A schema trigger now deletes the records a new item record supersedes, keeping each item's first record (restore reads it as admission evidence) and its newest (what a chat opens to). History written before this change is compacted once on a worker thread with its own connection, in small resumable pages at a 10% duty cycle.