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

Traversal Warnings in OAK while creating i18n JcrResourceBundle

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • i18n 2.4.2
    • Extensions
    • None

    Description

      org.apache.sling.i18n.impl.JcrResourceBundle#loadFully uses an XPath query to load [sling:Message] nodes under given paths. If the subtree under the path is too big (>1000), we receive traversal warnings in Oak. The following warning is generated if the path is /libs/wcm/core/i18n/de :

      GET /content/geometrixx/de.html HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 1000 nodes with filter Filter(query=select [jcr:path], [jcr:score], * from [sling:Message] as a where isdescendantnode(a, '/libs/wcm/core/i18n/de') /* xpath: /jcr:root/libs/wcm/core/i18n/de//element(*,sling:Message) */, path=/libs/wcm/core/i18n/de//*); consider creating an index or changing the query
      

      A suggestion would be to use TreeTraverser instead of XPath query since the subtree is mostly a flat list.

      Attachments

        1. SLING-4512-alex.patch
          5 kB
          Alexander Klimetschek
        2. SLING-4512.diff
          14 kB
          Amit Gupta

        Issue Links

          Activity

            People

              amitgupt Amit Gupta
              srbhatna Srijan Bhatnagar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: