Commit b04bb82
authored
[CRCR] Add 100-day TTL to crcr_workflow_job (#8556)
## Summary
Adds a 100-day TTL to `default.crcr_workflow_job`, addressing #8549. The
table previously had no data retention, causing indefinite accumulation.
### Key decisions
| Decision | Choice | Rationale |
|---|---|---|
| TTL column | `_inserted_at` | Server-controlled (`MATERIALIZED
now()`), immutable, avoids epoch-0 `started_at` bug |
| Retention | 100 days | 10-day buffer over the metrics page's "Last 90
days" view (TTL enforcement is async) |
| Partitioning | None added | `ReplacingMergeTree` only deduplicates
within a partition; partitioning on a mutable column risks breaking
`FINAL` correctness |
### Migration
```sql
ALTER TABLE default.crcr_workflow_job
MODIFY TTL toDate(_inserted_at) + toIntervalDay(100);
```
No table recreation required — `ALTER TABLE ... MODIFY TTL` works on
existing tables.
Closes #85491 parent a275efc commit b04bb82
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
0 commit comments