Chetan Mehrotra created OAK-2720:
------------------------------------
Summary: 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
Fix For: 1.3.0
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)