Description
With changes done in OAK-2569 it can happen that the cursor returned by LucenePropertyIndex gets reset multiple times as the index gets updated for a long running query
11697: 26.02.2016 16:12:16.296 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex ... took 3690 ms 47507: 26.02.2016 16:13:26.744 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex loading the next 12800 entries for query :fulltext:foo 47513: 26.02.2016 16:13:30.486 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex ... took 3742 ms 55832: 26.02.2016 16:15:43.693 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex loading the next 25600 entries for query :fulltext:foo 55835: 26.02.2016 16:15:51.261 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex ... took 7568 ms 59383: 26.02.2016 16:21:12.355 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex Change in index version detected 4186634 => 4186631. Query would be performed without offset 59384: 26.02.2016 16:21:12.355 *DEBUG* [qtp567069427-14229] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndex loading the first 51200 entries for query :fulltext:foo
If the index continuously gets updated then such a query would never finish and would consume system resources. For such case we should enforce some limit