Issue #1477
closedWith mongoengine models, developers have to manually configure uniqueness constraints for model unit keys
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
Updated by bmbouter almost 9 years ago
+1 to making this a release blocker for 2.8.0
Updated by bmbouter almost 9 years ago
- Related to Issue #1476: The RPM models are indexing a lot of fields that don't make sense to have indices added
Updated by mhrivnak almost 9 years ago
- Platform Release set to 2.8.0
- Triaged changed from No to Yes
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dkliban@redhat.com
Added by dkliban@redhat.com almost 9 years ago
Added by dkliban@redhat.com almost 9 years ago
Revision 53b871f0 | View on GitHub
Adds unit-key uniqueness constraint for all unit types
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from ASSIGNED to MODIFIED
Updated by dkliban@redhat.com over 8 years ago
- Status changed from MODIFIED to 5
Updated by dkliban@redhat.com over 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Adds unit-key uniqueness constraint for all unit types
https://pulp.plan.io/issues/1477 re #1477