jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-597) Uniqueness validator instead of unique index
Date Wed, 30 Jan 2013 13:25:13 GMT

    [ https://issues.apache.org/jira/browse/OAK-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566462#comment-13566462
] 

Michael Dürig commented on OAK-597:
-----------------------------------

Didn't/Don't we have something along these lines? See the discussion in OAK-270. Or was that
replaces in favour of using unique indexes at some point?
                
> Uniqueness validator instead of unique index
> --------------------------------------------
>
>                 Key: OAK-597
>                 URL: https://issues.apache.org/jira/browse/OAK-597
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, query
>            Reporter: Thomas Mueller
>            Priority: Minor
>
> We currently have a few unique indexes that ensure only one node may exist for a given
node type / property name / property value combination (for example the jcr:uuid needs to
be unique).
> While this works, I see some problems with this approach:
> - Indexes might be removed by an admin or they might not be available due to misconfiguration.
> - It (slightly) complicates the index implementation.
> - The index needs to do something that is not obvious (the index has to act like a constraint
/ validator). Updating an index can fail for different reasons that have a different meaning:
updating the index might fail due to duplicate key (which is not recoverable), and it might
fail due to a conflict (which is recoverable).
> Instead of using unique indexes, I propose to use a validator instead. The validator
can internally run a query to check if such a value already exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message