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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/04/07 12:41:12 UTC

[jira] [Resolved] (OAK-2720) Misleading traversal warning message while performing query

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

Chetan Mehrotra resolved OAK-2720.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.13

Done and also merged to 1.0 branch
* trunk - http://svn.apache.org/r1671787
* 1.0 - http://svn.apache.org/r1671793

Also updated the log message to include traversal count within index nodes

bq. Traversed 10000 nodes (110001 index entries) using index foo with filter Filter(query=SELECT * FROM [nt:base], path=*)

Also merged OAK-2224 to 1.0 to increase the threshold to 10000 to reduce the noise

> Misleading traversal warning message while performing query
> -----------------------------------------------------------
>
>                 Key: OAK-2720
>                 URL: https://issues.apache.org/jira/browse/OAK-2720
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: 1.0.13, 1.2
>
>         Attachments: OAK-2720.patch
>
>
> Currently {{ContentMirrorStoreStrategy}} logs a traversal warning if the property index performs node traversal of more than 10000 (default). 
> The intention here being to warn the end user that traversing so many nodes would cause performance issue. Traversal in itself might happen due to many reason like
> # Query not using right index. If the query has two property restriction and one of them is more broad while other is more selective and index is defined only for first then more traversal would be performed. The warning should help the user to create a new index for second property
> # Caller is fetching way more result - Query might end with say 50k result and caller is reading all. Such warning would help user to probably go for pagination
> So above are valid cases. However currently warning is also seen even if end result set is small say 100 but indexed paths are deep. As {{ContentMirrorStoreStrategy}} mirrors the path structure the current counting logic also counts the intermediate traversals. This warning is then misleading as how this internal structure is created is an implementation details of index which end user does not have any control. This leaves following options
> # Use different storage strategy which is more efficient in storage
> # Do not count the intermediate nodes traversed within index path and instead only count the matching node



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)