Skip to content

fix: batch queries in collect_ssvc_trees pipeline - #2527

Open
sc-lacanlale wants to merge 1 commit into
aboutcode-org:mainfrom
sc-lacanlale:fix/2522-collect-ssvc-trees-batching
Open

sc-lacanlale wants to merge 1 commit into
aboutcode-org:mainfrom
sc-lacanlale:fix/2522-collect-ssvc-trees-batching

Conversation

@sc-lacanlale

Copy link
Copy Markdown

collect_ssvc_data loaded all SSVC advisories at once and used prefetch_related("aliases"). On large databases, this exceeded the 1 GB PostgreSQL memory allocation limit.

This change processes advisories in batches of 1000. It uses values_list queries to find related advisories and aliases per batch.

Fixes #2522

collect_ssvc_data loaded all SSVC advisories at once and used
prefetch_related("aliases"). On large databases, this exceeded the
1 GB PostgreSQL memory allocation limit.

This change processes advisories in batches of 1000. It uses
values_list queries to find related advisories and aliases per batch.

Fixes aboutcode-org#2522

Signed-off-by: Shanley Clarence <115960237+sc-lacanlale@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

collect_ssvc_trees pipeline failing

1 participant