Skip to content

Fix `Security::OverrideUuidsService` matching logic

Mehmet Emin INAC requested to merge 343037_fix_override_uuid_service into master

What does this MR do and why?

This MR fixes the matching logic in the Security::OverrideUuidsService.

Related to #343037 (closed).

Database queries

This MR introduces 2 new queries.

1. Preloading the vulnerability_scanners records
The SQL query
SELECT
    "vulnerability_scanners".*
FROM
    "vulnerability_scanners"
WHERE
    "vulnerability_scanners"."id" IN (117, 249)
The execution plan
 Index Scan using vulnerability_scanners_pkey on public.vulnerability_scanners  (cost=0.42..5.50 rows=2 width=53) (actual time=3.634..4.427 rows=2 loops=1)
   Index Cond: (vulnerability_scanners.id = ANY ('{117,249}'::bigint[]))
   Buffers: shared hit=6 read=5
   I/O Timings: read=4.359 write=0.000
2. Preloading the vulnerability_identifiers records
The SQL query
SELECT
    "vulnerability_identifiers".*
FROM
    "vulnerability_identifiers"
WHERE
    "vulnerability_identifiers"."id" IN (984, 985, 986, 5561)
The execution plan
Index Scan using vulnerability_identifiers_pkey on public.vulnerability_identifiers  (cost=0.43..10.68 rows=4 width=157) (actual time=4.921..7.504 rows=4 loops=1)
   Index Cond: (vulnerability_identifiers.id = ANY ('{984,985,986,5561}'::bigint[]))
   Buffers: shared hit=11 read=7
   I/O Timings: read=7.384 write=0.000

MR acceptance checklist

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

Edited by Mehmet Emin INAC

Merge request reports