This PR addresses a bug found by a customer yesterday in which the pagination object in a search query payload was effectively ignored when a limits object was provided. Since the repository contained millions of documents, this cause a larger than expected amount of nodes to be loaded after the SOLR query was complete, causing an unexpected memory peak and potential out-of-memory error.
The following is the type of query that caused the problem:
The reason for increasing the permission evaluation count + time is to deal with the fact that a user may not have access to a lot of the low level results, requiring a larger limit to fill the expected maxItems for the pagination.
Expected behaviour: Search executed and returns either 1000 (matching) items or fewer when the permission check limits have been reached
Observed behaviour: Search executed and might return many more results than specified via maxItems or causing an out-of-memory error in the repository
This PR addresses a bug found by a customer yesterday in which the
pagination
object in a search query payload was effectively ignored when alimits
object was provided. Since the repository contained millions of documents, this cause a larger than expected amount of nodes to be loaded after the SOLR query was complete, causing an unexpected memory peak and potential out-of-memory error.The following is the type of query that caused the problem:
The reason for increasing the permission evaluation count + time is to deal with the fact that a user may not have access to a lot of the low level results, requiring a larger limit to fill the expected
maxItems
for the pagination.Expected behaviour: Search executed and returns either 1000 (matching) items or fewer when the permission check limits have been reached Observed behaviour: Search executed and might return many more results than specified via
maxItems
or causing an out-of-memory error in the repository