Skip to content

Enforce a limit on growth of alert_rule_version table #1639

Closed
@yaskinny

Description

@yaskinny

Describe the Bug
The operator appears to cause unexpected growth in the alert_rule_version table. I haven't investigated the root cause deeply, but the size of this table increases even without any updates. For example, I have set the re-evaluation interval for alerts to 10 minutes. Every 10 minutes, 500 new records are added to the table. I didn't check the diff between records to add more context but growth in records number is obvious. Additionally, when I delete a grafanaalertrule Custom Resource (CR) from the cluster, a large number of records are removed from this table, depending on how long the rule has existed—since every 10 minutes, multiple records are added for that specific grafanaalertrule. After stopping the operator, the growth in the table ceased.

I haven't updated to the latest version yet because I haven't found any mention of this issue in the release notes or in the repository's issue tracker.
Version
v5.9.1

To Reproduce

  1. Create alerts.
  2. Set the evaluation interval to X minutes.
  3. Check count of records in the alert_rule_version table

(I'm using PG 16 for database)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions