Skip to content

Reduce SBoM table updates

Brian Williams requested to merge bwill/reduce-sbom-table-updates into master

What does this MR do and why?

Sbom tables have very high contention and we have been performing upserts for all records ingested. This causes a number of issues including:

  1. Excessive number of database writes
  2. Deadlocked queries due to conflicting locks on the same rows
  3. Extra pressure on the primary database node

This change attempts to reduce the number of database writes by not performing upserts when inserting duplicate items. The ids for the existing items are needed for subsequent steps in the ingestion process, so we perform a SELECT query afterwards in order to get these.

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.

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 Brian Williams

Merge request reports

Loading