elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.62k stars 8.22k forks source link

[Response Ops][Alerting] Move `clearExpiredSnoozes` to background task #193345

Open ymao1 opened 1 month ago

ymao1 commented 1 month ago

During rule execution, we check whether the rule snooze schedule is up to date and clear any expired snoozes if it is not.

https://github.com/elastic/kibana/blob/f40bf527ff84d6d3d393a068c7c5f9a44586680d/x-pack/plugins/alerting/server/task_runner/task_runner.ts#L553-L563

We should consider moving this check to a background task to reduce the number of ES calls that made during rule execution.

elasticmachine commented 1 month ago

Pinging @elastic/response-ops (Team:ResponseOps)