Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mitigate deadlocks when creating purls #826

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/ingestor/src/graph/purl/creator.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::graph::error::Error;
use sea_orm::{ActiveValue::Set, ConnectionTrait, EntityTrait};
use sea_query::OnConflict;
use std::collections::{HashMap, HashSet};
use std::collections::{BTreeMap, HashSet};
use tracing::instrument;
use trustify_common::{db::chunk::EntityChunkedIter, purl::Purl};
use trustify_entity::{
Expand Down Expand Up @@ -36,9 +36,9 @@ impl PurlCreator {

// insert all packages

let mut packages = HashMap::new();
let mut versions = HashMap::new();
let mut qualifieds = HashMap::new();
let mut packages = BTreeMap::new();
let mut versions = BTreeMap::new();
let mut qualifieds = BTreeMap::new();

for purl in self.purls {
let (package, version, qualified) = purl.uuids();
Expand Down