Project

Profile

Help

Issue #3120

Race condition on saving a distribution unit during "smart proxy" sync

Added by ttereshc over 1 year ago. Updated about 1 month ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Severity:
2. Medium
Version:
Platform Release:
2.14.3
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 28

Description

Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808) Tried to save duplicate unique keys (insertDocument :: caused by :: 11000 E11000 duplicate key error index: pulp_database.units_distribution.$distribution_id_1_family_1_variant_1_version_1_arch_1  dup key: { : "ks-Repo-Server-1.1.1-x86_64", : "Repo", : "Server", : "1.1.1", : "x86_64" })
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808) Traceback (most recent call last):
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 277, in run
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     dist_sync.run()
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/parse/treeinfo.py", line 128, in run
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     self._run(tmp_dir)
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/parse/treeinfo.py", line 186, in _run
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     unit.save()
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)   File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 390, in save
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808)     raise NotUniqueError(message %% unicode(err))
Nov  6 14:36:30 test-machine pulp: pulp_rpm.plugins.importers.yum.sync:ERROR: [aa7bf120] (11567-79808) NotUniqueError: Tried to save duplicate unique keys (insertDocument :: caused by :: 11000 E11000 duplicate key error index: pulp_database.units_distribution.$distribution_id_1_family_1_variant_1_version_1_arch_1  dup key: { : "ks-Repo-Server-1.1.1-x86_64", : "Repo", : "Server", : "1.1.1", : "x86_64" })

Race condition happens here when multiple copies of the same repo are synced in parallel (for Katello case - multiple CVs of the repo are synced to "smart proxy")

Associated revisions

Revision caa1b46f View on GitHub
Added by ttereshc over 1 year ago

Eliminate race condition during sync of a distribution unit

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

History

#1 Updated by ttereshc over 1 year ago

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

#2 Updated by ttereshc over 1 year ago

  • Status changed from ASSIGNED to POST
  • Priority changed from Normal to High

#3 Updated by dalley over 1 year ago

  • Sprint/Milestone set to 47
  • Triaged changed from No to Yes

#4 Updated by ttereshc over 1 year ago

  • Status changed from POST to MODIFIED

#5 Updated by pcreech over 1 year ago

  • Platform Release set to 2.14.3

#6 Updated by pcreech over 1 year ago

  • Status changed from MODIFIED to ON_QA

#7 Updated by bmbouter about 1 year ago

  • Sprint set to Sprint 28

#8 Updated by bmbouter about 1 year ago

  • Sprint/Milestone deleted (47)

#9 Updated by dkliban@redhat.com 2 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#10 Updated by bmbouter about 1 month ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF