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] [Created] (OAK-6892) Query: ability to "nicely" traverse
Date Wed, 01 Nov 2017 09:27:01 GMT
Thomas Mueller created OAK-6892:

             Summary: Query: ability to "nicely" traverse
                 Key: OAK-6892
                 URL: https://issues.apache.org/jira/browse/OAK-6892
             Project: Jackrabbit Oak
          Issue Type: New Feature
          Components: query
            Reporter: Thomas Mueller
            Assignee: Thomas Mueller
            Priority: Normal
             Fix For: 1.9.0

Currently, queries that traverse many nodes log a warning, or can even fail (if configured).
This is to ensure system resources are not blocked (CPU, I/O, memory).

But there are cases where it doesn't make sense to create an index, but traverse (a certain
path structure, or sometimes even the whole repository). For example, finding a text with
"like '%xxx%'". The problem isn't that it's slow; the problem is that it's blocking / slowing
down other users. Another example is during migration, where the alternative is to create
an index (which also traverses the repository).

One option is to allow such queries to run, but throttle them. We could add the hint {{option(traversal
throttle)}} to do that. Throttle means: don't use up all I/O, but yield to other tasks depending
on config settings (during migration, yield is not needed). As a rule of thumb, the longer
the query runs, the more should it yield (up to some value).

It would be good to allow stopping such queries, and get progress information. The easiest
solution might be over JMX, and a more advanced solution is using new API (like, using an
interface QueryTraversalObserver, and have our QueryResult implement that interface).

This message was sent by Atlassian JIRA

View raw message