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

Duplicate Delete Errors: Inline import history + tags (B) #11740

Conversation

valentijnscholten
Copy link
Member

Description
Fixes and see: #6217

This PR replaces the bulk creation of the import history at the end of the (re)import with inline statements to create these records one by one. This prevents IntegrityErrors from happening during race conditions with the background duplicate delete job.

Test results
Manual testing only as creating a unit test / integration test is not feasible within a reasonable timeframe.

@valentijnscholten
Copy link
Member Author

This may need more work to prevent duplicate history records:

 django.db.utils.IntegrityError: duplicate key value violates unique constraint "dojo_test_import_finding_test_import_id_finding_i_e6f366e5_uniq"
uwsgi-1  | DETAIL:  Key (test_import_id, finding_id)=(35, 297) already exists.

Waiting for decision on option A, B, C before spending more time on it.

@valentijnscholten
Copy link
Member Author

Closed, see #11739

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.

1 participant