slachiewicz opened a new pull request, #787:
URL: https://github.com/apache/maven-indexer/pull/787

   A search with a large `Paging` page size failed with `OutOfMemoryError: 
Requested array size exceeds VM limit`. The page size was used as the initial 
capacity of the result lists, and `DefaultSearchEngine` sized the Lucene 
collector, which pre-allocates, from `count + start`. The page start was also 
computed as an `int` product, so a large offset wrapped negative and failed in 
`setStart`, or wrapped positive and returned the wrong page. The SMO backend 
had the same `int` product in its `start` parameter.
   
   The result lists now grow as needed, offsets are computed in `long`, and the 
collector is capped at the index's `maxDoc`, as Lucene's own 
`IndexSearcher.search(Query, int)` does. `Paging` keeps accepting any positive 
page size.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to