Skip to content

Skip updates for existing components and versions

What does this MR do and why?

Skip updates for existing components and versions

Currently, these records are created by upserts, which causes many needless updates that contribute to WAL volume on the database. This change fires a separate query to determine if records already exist instead. I estimate that this should result in a WAL volume reduction of several Mb/s on GitLab.com.

Fixes: https://gitlab.com/gitlab-org/gitlab/-/issues/474480

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Brian Williams

Merge request reports