You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/02/09 15:07:41 UTC

[jira] [Commented] (OAK-5621) Warn traversal queries: false positive for join on parent

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

Thomas Mueller commented on OAK-5621:
-------------------------------------

The problem is not actually related to parent node traversal. Instead, the problem is that there are multiple possible join plans, because there are two possible join orders. For that case, the warning is logged if there is (at least) one possible plan that needs to use traversal. That logic is not correct. The warning should only be logged if _all_ possible plans need to use traversal.

The problem is not limited to joins: the same problem can occur for SQL-2 queries with "or" conditions. In that case, there are multiple possible queries (or query with "or", and one query using "union" instead).

> Warn traversal queries: false positive for join on parent
> ---------------------------------------------------------
>
>                 Key: OAK-5621
>                 URL: https://issues.apache.org/jira/browse/OAK-5621
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 1.8
>
>
> The following query logs that the query doesn't use an index:
> {noformat}
> /jcr:root/content//*/jcr:content[@jcr:uuid = '03b6fd98-e5f1-4674-9bce-d02c9b17cecd']
> {noformat}
> The query correctly uses the uuid index to locate the node, and then traverses the parent nodes to verify the path constraint matches. So, strictly speaking this is traversal, but only traversal to the parent nodes, and not traversal down the tree. Traversal to the parent nodes is not problematic, so no message should be logged.
> A workaround it to change the query by appending {{option(traversal ok)}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)