oncall-engine/engine/settings
Matias Bordese 845940d9b3
Update alert group search to force index in MySQL (#4731)
Related to https://github.com/grafana/oncall-private/issues/2679

Confirmed the query rewriting works via MySQL query logs (index is also
forced for the stats queries):

`2024-07-24T19:50:59.482751Z 3977 Query SELECT `alerts_alertgroup`.`id`
FROM `alerts_alertgroup` FORCE INDEX (`alert_group_list_index`) WHERE
(`alerts_alertgroup`.`channel_id` IN (13) AND (1) AND
(`alerts_alertgroup`.`public_primary_key` LIKE 'test' OR
`alerts_alertgroup`.`inside_organization_number` LIKE 'test' OR
`alerts_alertgroup`.`web_title_cache` LIKE '%test%') AND
`alerts_alertgroup`.`root_alert_group_id` IS NULL AND
((`alerts_alertgroup`.`silenced` = ('0') AND
`alerts_alertgroup`.`acknowledged` = ('0') AND
`alerts_alertgroup`.`resolved` = ('0')) OR
(`alerts_alertgroup`.`acknowledged` = ('1') AND
`alerts_alertgroup`.`resolved` = ('0'))) AND
`alerts_alertgroup`.`started_at` >= '2024-06-24 19:50:58' AND
`alerts_alertgroup`.`started_at` <= '2024-07-24 19:50:58') ORDER BY
`alerts_alertgroup`.`started_at` DESC LIMIT 26
`

Rewriting will only be applied to the alert group search queries, when
the feature flags are enabled. Dependency was already listed as a
requirement.
2024-07-25 09:21:32 +00:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
base.py Update alert group search to force index in MySQL (#4731) 2024-07-25 09:21:32 +00:00
celery_task_routes.py Fix bug for incorrect arguments used to invoke cleanup_empty_deleted_integrations (#4707) 2024-07-19 14:32:22 +00:00
ci_test.py bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
dev.py Add tilt button to run pytest, fix local dev config for pytest, minor improvements to til (#3927) 2024-07-09 01:24:18 +00:00
helm.py Allow multiple database and celery broker types (#582) 2022-10-04 09:25:53 +01:00
hobby.py Allow multiple database and celery broker types (#582) 2022-10-04 09:25:53 +01:00
prod_without_db.py Add tilt button to run pytest, fix local dev config for pytest, minor improvements to til (#3927) 2024-07-09 01:24:18 +00:00