You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/09/26 00:06:36 UTC
[PR] Handle large page sizes and offsets in search [maven-indexer]
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Handle large page sizes and offsets in search [maven-indexer]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz merged PR #787:
URL: https://github.com/apache/maven-indexer/pull/787
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org