Skip to content

Resolve cross join issues in ee/app/services/vulnerabilities/remediations/batch_destroy_service.rb

What does this MR do and why?

This MR remove a cross join exception in the batch destroy service which was added as part of the initial phase of the sec-decomposition work. In order to ensure this code works post decomposition we need to ensure that the application does not attempt to access/modify data that is present in separate DB's in the same query.

This service required a vulnerability_remediations query to be split from a uploads table query. Thankfully the bounding of the query by a batch limit of 1000 in the calling worker makes this reasonably safe to do.

Performance of the modified queries can be found in comments on the MR.

MR acceptance checklist

Please 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 #480163 (closed)

Edited by Gregory Havenga

Merge request reports

Loading