Due to the way the indexing happens in AEM 6.0 onwards many a times the queries we fire will result in Traversal and can even bring down the system.
How to diagnose the traversal - look for the below WARN in the error.log
WARN [...] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed <0000> nodes with filter Filter...
Here's how you can stop:
- Navigate to the Query Engine Settings on the JMX console http://<host:port>/system/console/jmx
- Copy the LimitReads onto your notepad. Thereafter, change the LimitReads value to any arbitrary number, say 50000.
- Once you notice that the logs are back to normal i.e. no traversal in the error.log, change the LimitReads to its original value.