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

Make query for validation models more Oak-friendly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Validation 1.0.0
    • Validation
    • None

    Description

      Currently the ResourceValidationModelProviderImpl is looking for appropriate models with the following query:
      /jcr:root/apps//validation//*[@sling:resourceType="sling/validation/model" and @validatedResourceType="<some resource type>"

      This leads to warnings like this in OAK:

      14.08.2015 14:07:04.659 *WARN* [0:0:0:0:0:0:0:1 [1439554021017] GET <some path> HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 8000 nodes with filter Filter(query=select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on isdescendantnode(b, a) where name(a) = 'validation' and isdescendantnode(a, '/apps') and b.[sling:resourceType] = 'sling/validation/model' and b.[validatedResourceType] = '<some resource type>' /* xpath: /jcr:root/apps//validation//*[@sling:resourceType="sling/validation/model" and @validatedResourceType="<some resource type>"] */, path=/apps//*); consider creating an index or changing the query
      

      Attachments

        Activity

          People

            kwin Konrad Windszus
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: