Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
JCR Resource 3.2.0
-
None
-
None
Description
*Problem Statement*
Currently, the BasicQueryLanguageProvider used by the JCRResourceProvider for executing queries for methods like findResources executes a query without a limit set.
At the same time, in Apache Jackrabbit Oak, queries will fail if the query reads more than a configurable limit of nodes:
https://jackrabbit.apache.org/oak/docs/query/query-engine.html#Slow_Queries_and_Read_Limits
This means that it's entirely possible to create a well indexed, well crafted query in Apache Sling that will still throw an Exception at runtime for larger repositories when using ResourceResolver.findResources or ResourceResolver.queryResources if the query returns more than the Oak Read limit number of results.
*Solution*
Add an optional setting to the JCR Resource Provider to set a limit on the number of returned results from queries. While this would mean that in certain cases the queries would return an incomplete set of results, they would still nevertheless return results rather than failing.
Attachments
Issue Links
- relates to
-
SLING-11230 Support Limit and Offset via JcrResourceProvider / findResources
- Resolved