Skip to content
Snippets Groups Projects

Ensure components are ingested in a consistent order

Merged Brian Williams requested to merge bwill/sort-components-before-ingestion into master

What does this MR do and why?

When generating SBoMs, Trivy sorts components by the bomRef attribute, which can either be the package URL of the dependency, or a UUID. When it is a UUID, it results in components being in a random order. When this happens, it causes deadlocks when ingesting SBoMs, as the inserts acquire locks on random rows and this can sometimes result in circular locking. This change ensures that components are always ordered consistently prior to ingestion, which will allow the locks to be acquired and released in order.

Fixes: #404630 (closed)

How to set up and validate locally

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

Difficult to reproduce locally. Only happens with several concurrent workers executing at once.

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading