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
Context: These new time-series tables (#45-#47) will grow unbounded without a retention policy. .env.example already has BACKUP_RETENTION_DAYS for backups -- this is the equivalent for time-series data.
Where:
.env.example -- add a retention config (e.g. TIMESERIES_RETENTION_DAYS)
A cleanup job in src/jobs/, following the pattern of the existing JOB_CACHE_CLEANUP_ENABLED job
Test the deletion query on a copy of realistic-volume data before running it against anything real -- an unbounded DELETE without a LIMIT/batching strategy can lock a table for a long time on a large dataset.
Definition of done:
Old rows are pruned/downsampled per the documented policy, verified in a test
Context: These new time-series tables (#45-#47) will grow unbounded without a retention policy.
.env.examplealready hasBACKUP_RETENTION_DAYSfor backups -- this is the equivalent for time-series data.Where:
.env.example-- add a retention config (e.g.TIMESERIES_RETENTION_DAYS)src/jobs/, following the pattern of the existingJOB_CACHE_CLEANUP_ENABLEDjobWhat to do:
Suggested approach:
JOB_CACHE_CLEANUP_ENABLED/JOB_CACHE_CLEANUP_INTERVAL_SECONDSpattern for the new cleanup job's config.Watch out for:
Definition of done: