Skip to content

Delete threat_monitoring alerts from database

What does this MR do and why?

This MR removes threat_monitoring alerts from database as this type of alerts is deprecated and cannot be accessible from %15.0.

Migrations

== 20220510121338 RemoveThreatMonitoringAlerts: migrating =====================
-- execute("DELETE FROM alert_management_alerts WHERE domain = 1")
   -> 0.0049s
== 20220510121338 RemoveThreatMonitoringAlerts: migrated (0.0050s) ============

== 20220510121338 RemoveThreatMonitoringAlerts: migrating =====================
-- execute("DELETE FROM alert_management_alerts WHERE domain = 1")
   -> 0.0095s
== 20220510121338 RemoveThreatMonitoringAlerts: migrated (0.0095s) ============

Queries

explain SELECT id FROM alert_management_alerts WHERE domain = 1;

Time: 189.765 ms
  - planning: 1.025 ms
  - execution: 188.740 ms
    - I/O read: 187.215 ms
    - I/O write: 0.000 ms

Shared buffers:
  - hits: 3 (~24.00 KiB) from the buffer pool
  - reads: 27 (~216.00 KiB) from the OS file cache, including disk I/O
  - dirtied: 0
  - writes: 0

https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/10041/commands/35591

exec DELETE FROM alert_management_alerts WHERE domain = 1;
The query has been executed. Duration: 842.846 ms

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #352287 (closed)

Edited by Alan (Maciej) Paruszewski

Merge request reports