Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11229

Add Option to Limit JCR Resource Provider Queries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • JCR Resource 3.2.0
    • None
    • JCR
    • 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

          Activity

            People

              dklco Dan Klco
              dklco Dan Klco
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m