Project

Profile

Help

Issue #1477

With mongoengine models, developers have to manually configure uniqueness constraints for model unit keys

Added by rbarlow almost 5 years ago. Updated over 1 year ago.

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

Description

I was surprised to learn that our Mongoengine conversion requires developers to both identify the unit key, and also install a uniqueness index for it. Pulp's old model code installed the unit key uniqueness constraint for you, so this is a devloper feature regression. Pulp scans the models for the unit key field as is, so it should continue to automatically install uniqueness constraints based on the unit key field.

If we don't do this, it is highly likely that developers will forget to specify the uniqueness constraints in their models as time goes on, which will lead to bugs in code the depends on the constraints. We certainly have code that depends on uniqueness as a technique to work around Mongo's lack of transactions (such as Docker Tags, or the way the resource manager works).

Until this is fixed, I will install a uniqueness constraint on the Docker Tag model to work around it, and the RPM model already seems to have an index being installed.


Related issues

Related to RPM Support - Issue #1476: The RPM models are indexing a lot of fields that don't make sense to have indicesCLOSED - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 53b871f0 View on GitHub
Added by dkliban@redhat.com almost 5 years ago

Adds unit-key uniqueness constraint for all unit types

https://pulp.plan.io/issues/1477 re #1477

Revision 53b871f0 View on GitHub
Added by dkliban@redhat.com almost 5 years ago

Adds unit-key uniqueness constraint for all unit types

https://pulp.plan.io/issues/1477 re #1477

History

#1 Updated by bmbouter almost 5 years ago

+1 to making this a release blocker for 2.8.0

#2 Updated by bmbouter almost 5 years ago

  • Related to Issue #1476: The RPM models are indexing a lot of fields that don't make sense to have indices added

#3 Updated by mhrivnak almost 5 years ago

  • Platform Release set to 2.8.0
  • Triaged changed from No to Yes

#4 Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com

#6 Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from MODIFIED to 5

#7 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF