Skip to content

fix(db): retain tag info with cleanup#162

Merged
XOlegator merged 1 commit into
masterfrom
fix/tag-info-retention
May 30, 2026
Merged

fix(db): retain tag info with cleanup#162
XOlegator merged 1 commit into
masterfrom
fix/tag-info-retention

Conversation

@XOlegator
Copy link
Copy Markdown
Contributor

@XOlegator XOlegator commented May 30, 2026

Summary

Keep ipm_tag_info under the same retention policy as the other aggregated tables and add an index on created_at for efficient cleanup.

Why

ipm_tag_info is populated on every aggregation run and is queried with a created_at window in the UI, but it was not included in the retention cleanup list. That means the table would keep growing past the configured APP_RECORDS_LIFETIME even though the rest of the aggregate tables are pruned.

Change

  • add ipm_tag_info to the aggregation cleanup list
  • add a migration that creates iti_c on ipm_tag_info(created_at) so cleanup does not scan the whole table

Validation

  • php -l src/Command/AggregateCommand.php
  • php -l migrations/Version20260530160000.php
  • vendor/bin/phpstan analyse --no-progress src/Command/AggregateCommand.php migrations/Version20260530160000.php
  • vendor/bin/phpunit --no-progress

Local data check

  • ipm_tag_info exists in the local pinba database and is populated by the current aggregator
  • the table already has rows older than 14 days, so retention is relevant under the configured P1M lifetime

@XOlegator XOlegator merged commit 274d671 into master May 30, 2026
4 checks passed
@XOlegator XOlegator deleted the fix/tag-info-retention branch May 30, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant