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-1137) Node.getReferences() is slow due to missing property index
Date Thu, 14 Nov 2013 10:27:21 GMT

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

Michael Dürig commented on OAK-1137:

I think what Jukka meant was to make the query implementation to use the hidden back reference
property as an additional index.

However resolving references through queries is nasty business. The query result only returns
nodes for each of which you still have to manually go through all of its properties to find
the desired one. Alex' approach is much cleaner here as a quick glance at {{IdentifierManager#getReferences}}

Regarding not being able to access the hidden back reference property I don't think we should
promote access to the underlying node state to the Tree API as this would break encapsulation.
What about not hiding this property? We could automatically add a mixin (e.g. oak:references)
to referenceable nodes, which declares such back references as a protected property.

> Node.getReferences() is slow due to missing property index
> ----------------------------------------------------------
>                 Key: OAK-1137
>                 URL: https://issues.apache.org/jira/browse/OAK-1137
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, jcr
>    Affects Versions: 0.10
>            Reporter: Tobias Bocanegra
>            Assignee: Alex Parvulescu
>            Priority: Critical
>             Fix For: 0.12
>         Attachments: OAK-1137.patch
> Node.getReferences() traverses all items in the repository in order to find the properties
that reference the given node. this is super slow and does not scale. 
> the (weak) reference properties should be auto-indexed.

This message was sent by Atlassian JIRA

View raw message