jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OAK-5173) Path in uniqueness constraint violation exception is always the root
Date Fri, 01 Dec 2017 07:58:00 GMT

     [ https://issues.apache.org/jira/browse/OAK-5173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Mueller resolved OAK-5173.
---------------------------------
    Resolution: Fixed

http://svn.apache.org/r1816801

> Path in uniqueness constraint violation exception is always the root
> --------------------------------------------------------------------
>
>                 Key: OAK-5173
>                 URL: https://issues.apache.org/jira/browse/OAK-5173
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, property-index
>    Affects Versions: 1.4.10, 1.5.14
>            Reporter: Alexander Klimetschek
>            Assignee: Thomas Mueller
>             Fix For: 1.8, 1.7.12
>
>
> OAK-1997 added a (single) path to the uniqueness constraint exception message in the
PropertyIndexEditor to point out where the duplicate came from, but it is always the root:
> {noformat}
> OakConstraint0030: Uniqueness constraint violated at path [/] for one of the property
in [rep:externalId] having value xyz1234
> {noformat}
> That is because it [uses getPath()|https://github.com/apache/jackrabbit-oak/blob/3a88b23d51beae4798e9b29c4deaba81c81fb427/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java#L315-L318]
of the index editor itself and the uniqueness check always [happens at the root level|https://github.com/apache/jackrabbit-oak/blob/3a88b23d51beae4798e9b29c4deaba81c81fb427/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java#L303]
at the end.
> It probably has to read from the index to find out the 2 or more paths with the same
property value (just printing one path is not enough information for duplicates).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message