Project

Profile

Help

Issue #2721

closed

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

Added by ttereshc about 7 years ago. Updated about 5 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".

Also available in: Atom PDF