Loading
Sync tracked context traversal_ids on group transfer
What does this MR do and why?
Add a worker Security::ProcessTrackedContextGroupTransferEventsWorker to handle Groups::GroupTransferedEvent and sync traversal_ids
Uses the group evend handling pattern in Sbom::ProcessTransferEventsWorker
Database review
- Fetch security project tracked contexts for a batch of projects
SELECT "project_ids"."id"
FROM (VALUES (2), (3), (20), (21), (33), (100), (995), (10000), (235168)) AS project_ids(id),
LATERAL (
SELECT 1 FROM "security_project_tracked_contexts"
WHERE (project_ids.id = project_id)
LIMIT 1
) AS security_project_tracked_contexts;Query Plan - https://postgres.ai/console/gitlab/gitlab-production-sec/sessions/58014/commands/162727
Old Query
SELECT DISTINCT security_project_tracked_contexts.project_id
FROM security_project_tracked_contexts
WHERE security_project_tracked_contexts.project_id IN (2, 3, 20, 21, 33, 100, 995, 10000, 235168);Query Plan - https://postgres.ai/console/gitlab/gitlab-production-sec/sessions/57775/commands/162404
References
Relates to: #627197
How to set up and validate locally
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.
Related to #627197
Edited by Rushik Subba