Project

General

Profile

Bug #8586

Race condition in indexing errata

Added by Stephen Benjamin over 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Category:
Errata Management
Target version:
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Syncing two repos at the same time which may contain the same errata can result in a race condition because find_or_create_by isn't atomic (http://www.rubydoc.info/docs/rails/ActiveRecord/Relation:find_or_create_by)

ActiveRecord::RecordNotUnique

PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_katello_errata_on_uuid" : INSERT INTO "katello_errata" ("created_at", "description", "errata_id", "errata_type", "issued", "reboot_suggested", "severity", "solution", "summary", "title", "updated", "updated_at", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id" 

Associated revisions

Revision d379aca4 (diff)
Added by Justin Sherrill almost 8 years ago

fixes #8586 - fixing race condition on errata index

Revision f032f877
Added by Justin Sherrill almost 8 years ago

Merge pull request #5280 from jlsherrill/8586

fixes #8586 - fixing race condition on errata index

History

#1 Updated by Justin Sherrill over 8 years ago

  • Priority changed from Normal to High
  • Target version set to 62
  • Legacy Backlogs Release (now unused) set to 14
  • Difficulty set to medium
  • Triaged changed from No to Yes

#2 Updated by Eric Helms about 8 years ago

  • Target version changed from 62 to 63

#3 Updated by Eric Helms about 8 years ago

  • Legacy Backlogs Release (now unused) changed from 14 to 23

#4 Updated by Eric Helms about 8 years ago

  • Target version changed from 63 to 66

#5 Updated by Eric Helms about 8 years ago

  • Target version deleted (66)

#6 Updated by Eric Helms about 8 years ago

  • Target version set to 67

#7 Updated by Eric Helms about 8 years ago

  • Target version changed from 67 to 68

#8 Updated by Eric Helms almost 8 years ago

  • Legacy Backlogs Release (now unused) changed from 23 to 31

#9 Updated by Eric Helms almost 8 years ago

  • Target version deleted (68)

#10 Updated by Walden Raines almost 8 years ago

  • Bugzilla link set to 1219054

#11 Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5280 added
  • Pull request deleted ()

#12 Updated by Justin Sherrill almost 8 years ago

  • Assignee set to Justin Sherrill

#13 Updated by Justin Sherrill almost 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF