Project

Profile

Help

Issue #4085

closed

ContentUnitSaver stage is vulnerable to race conditions.

Added by jortel@redhat.com about 6 years ago. Updated almost 5 years ago.

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

Description

The ContentUnitSaver stage is creating Content using save() and both ContentArtifact and RemoteArtifact using bulk_create() which will raise an IntegretyError on any constraint violation. The same content can be created concurrently during operations such as sync and upload when running more than 1 worker. The race condition exists between the QueryExistingContentUnits and ContentUnitSaver stages. As a result, the un-handled IntegretyError will cause one of the operations to fail.

The impact on users is that syncs will randomly fail with an IntegretyError which will be very concerning.


Related issues

Related to Pulp - Issue #4060: QueryExistingArtifacts stage does not prevent duplicates within a streamCLOSED - CURRENTRELEASEdkliban@redhat.comActions
Related to Container Support - Refactor #4178: Update sync to use ContentSaver StageCLOSED - CURRENTRELEASEipanova@redhat.com

Actions

Also available in: Atom PDF