Backfill group archive state to Vulnerability rows
What does this MR do and why?
Backfill group archive state to Vulnerability rows
This migration backfills the Group archived state to Vulnerability Reads and Vulnerability Statistics.
To better utilise existing indexes, the migration works as follows:
- Batch by
NamespaceSettings, filtering byarchived = true. Internal query performance link. - Find the
Namespaceby looking up by ID (primary key lookup, no plan needed).
We start iterating the NamespaceSettings to find archived groups, and for each of those namespaces use the TraversalIDs to iterate over Vulnerability Reads / Statistics, archiving records as appropriate.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Ryan Wells