Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qqmyers opened this issue Oct 6, 2023 · 1 comment · Fixed by #9984
Closed

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

qqmyers opened this issue Oct 6, 2023 · 1 comment · Fixed by #9984
Milestone

Comments

@qqmyers
Copy link
Member

qqmyers commented Oct 6, 2023

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.

@jggautier
Copy link
Contributor

Just noting here that the pull request attached to this issue, at #9984, also addressed what I described in #8857 about fields in metadata block TSV files, specifically the Citation metadata block that ships with Dataverse, that have allowControlledVocabulary property set to true, but no CV terms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants