Project

Profile

Help

Issue #9029

closed

Problems when syncing identical repositories simultaneously

Added by dalley over 3 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 103
Quarter:

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)

Related issues

Related to RPM Support - Issue #8967: "duplicate key value violates unique constraint" when syncing two repositories with identical content in parallelCLOSED - DUPLICATEActions
Copied to RPM Support - Backport #9267: Backport #9029 "Problems when syncing identical repositories simultaneously" to 3.14.zCLOSED - CURRENTRELEASE

Actions
Actions #1

Updated by dalley over 3 years ago

  • Description updated (diff)
Actions #2

Updated by dalley over 3 years ago

  • Severity changed from 2. Medium to 3. High
  • Triaged changed from No to Yes
  • Sprint set to Sprint 101
Actions #3

Updated by ggainey over 3 years ago

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)
Actions #4

Updated by dalley over 3 years ago

  • Related to Issue #8967: "duplicate key value violates unique constraint" when syncing two repositories with identical content in parallel added
Actions #5

Updated by ipanova@redhat.com over 3 years ago

  • Sprint changed from Sprint 101 to Sprint 102
Actions #7

Updated by dalley over 3 years ago

  • Priority changed from Normal to High
  • Tags Katello added
Actions #8

Updated by dalley over 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #9

Updated by pulpbot over 3 years ago

  • Status changed from ASSIGNED to POST
Actions #10

Updated by rchan over 3 years ago

  • Sprint changed from Sprint 102 to Sprint 103

Added by dalley over 3 years ago

Revision 74db3255 | View on GitHub

Fix some errors when identical content is synced simultaneously

closes: #9029 https://pulp.plan.io/issues/9029

Actions #11

Updated by dalley over 3 years ago

  • Status changed from POST to MODIFIED
Actions #12

Updated by dalley over 3 years ago

  • Sprint/Milestone set to 3.15.0
Actions #13

Updated by dalley over 3 years ago

  • Copied to Backport #9267: Backport #9029 "Problems when syncing identical repositories simultaneously" to 3.14.z added
Actions #15

Updated by pulpbot about 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF