Issue #9029
closed
Problems when syncing identical repositories simultaneously
Status:
CLOSED - CURRENTRELEASE
Description
Unguarded uses of bulk_create()
are not resilient to races when repositories are synced simultaneously, causing one or both of the syncs to fail.
if addons:
Addon.objects.bulk_create(addons)
if checksums:
Checksum.objects.bulk_create(checksums)
if images:
Image.objects.bulk_create(images)
if variants:
Variant.objects.bulk_create(variants)
- Description updated (diff)
- Severity changed from 2. Medium to 3. High
- Triaged changed from No to Yes
- Sprint set to Sprint 101
pulpcore uses of bulk_create():
(master) ~/github/Pulp3/pulpcore/pulpcore/app $ find . -name \*.py | xargs grep "bulk_create("
./models/repository.py: RepositoryContent.objects.bulk_create(repo_content)
./models/repository.py: RepositoryVersionContentDetails.objects.bulk_create(counts_list)
./models/content.py: return super().bulk_create(objs, batch_size=batch_size)
- Related to Issue #8967: "duplicate key value violates unique constraint" when syncing two repositories with identical content in parallel added
- Sprint changed from Sprint 101 to Sprint 102
- Priority changed from Normal to High
- Tags Katello added
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
- Status changed from ASSIGNED to POST
- Sprint changed from Sprint 102 to Sprint 103
- Status changed from POST to MODIFIED
- Sprint/Milestone set to 3.15.0
- Copied to Backport #9267: Backport #9029 "Problems when syncing identical repositories simultaneously" to 3.14.z added
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Fix some errors when identical content is synced simultaneously
closes: #9029 https://pulp.plan.io/issues/9029