Project

Profile

Help

Issue #1477

closed

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

Added by rbarlow over 8 years ago. Updated about 5 years 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 - WONTFIXActions
Actions #1

Updated by bmbouter over 8 years ago

+1 to making this a release blocker for 2.8.0

Actions #2

Updated by bmbouter over 8 years ago

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

Updated by mhrivnak over 8 years ago

  • Platform Release set to 2.8.0
  • Triaged changed from No to Yes
Actions #4

Updated by dkliban@redhat.com about 8 years ago

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

Added by dkliban@redhat.com about 8 years ago

Revision 53b871f0 | View on GitHub

Adds unit-key uniqueness constraint for all unit types

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

Added by dkliban@redhat.com about 8 years ago

Revision 53b871f0 | View on GitHub

Adds unit-key uniqueness constraint for all unit types

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

Actions #6

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by dkliban@redhat.com about 8 years ago

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

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF