Skip to content

Missing constraints allow duplicate values for external CVoc and oaiset #9983

@qqmyers

Description

@qqmyers

The ExternalVocabularyValue and OaiSet classes have an @column annotation intended to put a unique constraint on the columns in the externalvocabularyvalue (uri column) and oaiset (spec column) tables. For the externalvocabularyvalue table, parallel edits of different datasets including the same external vocab uri can result in duplicate values in the table which then causes failures in retrieval when getSingleValue() is used with the query.

  • What did you expect to happen?

The tables should have these constraints on them. Further, in the case of external vocab values, it makes sense to isolate the update of this table in its own transaction - this minimizes the time during when parallel dataset edits can actually cause a problem, and assures that if an attempt to write a duplicate value is made (and now fails due to the constraint) that the overall dataset transaction can succeed.

Which version of Dataverse are you using? 5.14/6.0 - the problem should not be new but would only be seen when parallel edits of datasets are made with external controlled vocabulary values configured and with the same uri appearing in more than one dataset.

PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions