Project

Profile

Help

Issue #2721

Race condition on errata model save during sync of multiple similar repos

Added by ttereshc almost 5 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.13.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 18
Quarter:

Description

Here is the spot where race condition can happen:

existing_unit = model.__class__.objects.filter(**model.unit_key).first()
if not existing_unit:
    model.save()

The probability of such race condition becomes quite high when multiple repos of the same errata content are synced in parallel. This is a common case for "smart proxy".

Associated revisions

Revision d64b123f View on GitHub
Added by ttereshc almost 5 years ago

Eliminate race condition during errata sync

Catch NotUniqueError exception rather than explicitly check the existence of the erratum unit.

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

History

#1 Updated by dkliban@redhat.com almost 5 years ago

  • Triaged changed from No to Yes

#2 Updated by dkliban@redhat.com almost 5 years ago

  • Sprint/Milestone set to 37

#4 Updated by ttereshc almost 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#5 Updated by ttereshc almost 5 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by ttereshc almost 5 years ago

  • Status changed from POST to MODIFIED

#8 Updated by bizhang over 4 years ago

  • Platform Release set to 2.13.1

#9 Updated by bizhang over 4 years ago

  • Status changed from MODIFIED to 5

#10 Updated by bizhang over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter almost 4 years ago

  • Sprint set to Sprint 18

#13 Updated by bmbouter almost 4 years ago

  • Sprint/Milestone deleted (37)

#14 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF