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

Adds configurable batch insert for References and Vulnerabilities #1014

Merged
merged 5 commits into from
Dec 10, 2017
Merged

Conversation

alefq
Copy link
Contributor

@alefq alefq commented Nov 30, 2017

Fixes Issue

Makes use of batch capabilities of PreparedStatement. Executes updates every n rows (configurable), slowing down time for vulnerabilities updates by a near 10x factor on external databases (Postgresql for instance).
Tested on H2 (default), and Postgresql.

Description of Change

Applies batch inserts for reference and vulnerability tables, solves
slow one-by-one insert process, for Vulnerabilities with several
references/vulnerabilities associated.
Feature is configurable through properties: database.batchinsert.enabled
and database.batchinsert.maxsize.

Have test cases been added to cover the new functionality?

no

Tests available already cover the process. All tests where executed before pushing code to forked repository

Ale Feltes added 4 commits November 17, 2017 10:36
Applies batch inserts for reference and vulnerability tables,
solves the slow one-by-one insert process, for Vulnerabilities
with several references/vulnerabilities associated.
Applies batch inserts for reference and vulnerability tables, solves
slow one-by-one insert process, for Vulnerabilities with several
references/vulnerabilities associated.
Feature is configurable through properties: database.batchinsert.enabled
and database.batchinsert.maxsize.
cve.startyear value is 2002.
@jeremylong
Copy link
Owner

Can one of the admins verify this patch?

Remove unused variable.
@jeremylong
Copy link
Owner

Thanks! It will likely be next weekend before I can take a look at this update.

@jeremylong jeremylong merged commit b46d13f into jeremylong:master Dec 10, 2017
@jeremylong
Copy link
Owner

Thanks for the PR - I've done some testing on mysql and the earlier issues identified with batching look like they have been resolved via other changes to the tool.

@lock lock bot locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants