Sbom::BuildDependencyGraph#remove_existing_dependency_graph failing due to statement timeout

Summary

The new Sbom::BuildDependencyGraph service fails occasionally due to statement timeouts when attempting to delete a very large number of records.

What is the current bug behavior?

Worker times out when deleting a large number of records

What is the expected correct behavior?

Worker should successfully delete a large number of records

Relevant logs and/or screenshots

https://log.gprd.gitlab.net/app/discover#/?_g=h@58ed1e0&_a=h@c2f7d4c

Output of checks

This bug happens on GitLab.com

Possible fixes

We should fix this by batching the bulk deletions.

Assignee Loading
Time tracking Loading