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".

Actions #1

Updated by dkliban@redhat.com about 7 years ago

  • Triaged changed from No to Yes
Actions #2

Updated by dkliban@redhat.com about 7 years ago

  • Sprint/Milestone set to 37
Actions #4

Updated by ttereshc about 7 years ago

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

Added by ttereshc about 7 years ago

Revision d64b123f | View on GitHub

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

Actions #5

Updated by ttereshc about 7 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by ttereshc about 7 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by bizhang almost 7 years ago

  • Platform Release set to 2.13.1
Actions #9

Updated by bizhang almost 7 years ago

  • Status changed from MODIFIED to 5
Actions #10

Updated by bizhang almost 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 18
Actions #13

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (37)
Actions #14

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF