Feat/Log Compaction - #102
Merged
Merged
Conversation
Contributor
Implement Event Log CompactionOverviewThis change adds an automated system for event log compaction. It addresses database size growth by summarizing and deleting old Technical Highlights
Impact
|
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
RijulTP
reviewed
Aug 28, 2026
LinceMathew
reviewed
Aug 28, 2026
| ) | ||
|
|
||
| const defaultCompactionCronExpr = "30 20 * * *" // Daily at 2:00 AM IST (20:30 UTC) | ||
| const defaultRetentionDays = 30 |
Contributor
There was a problem hiding this comment.
This time frame is for retaining what data?
Contributor
Author
There was a problem hiding this comment.
For event_type = log.
For example, chunking logs, which is not important in the long term storage.
LinceMathew
requested changes
Aug 28, 2026
Amazing-Stardom
marked this pull request as ready for review
August 30, 2026 03:41
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.
Log Compaction Cron Job
Currently the
review_eventstable is growing rapidly over time.Problem
After analysis, 95% of the rows in
review_eventsare verbose debug logs—LLM streaming chunks, divider lines, and hunk debug prints—that are not needed for long-term storage. These were causing the table to reach 4.89M rows / 1.57 GB.Solution