[ 
https://issues.apache.org/jira/browse/SLING-11439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601848#comment-17601848
 ] 

Julian Reschke commented on SLING-11439:
----------------------------------------

I now tried

{noformat}
SELECT [sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM 
[nt:base] WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS 
NOT NULL ORDER BY FIRST([sling:vanityPath]), [jcr:path] OPTION (LIMIT 1000)
{noformat}

on a repo with > 100K vanity paths, and I'm still getting the same exception:

{noformat}
08.09.2022 16:17:53.133 *DEBUG* [Background Update 
org.apache.sling.resourceresolver (183)] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries start vanityPath 
query: SELECT [sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM 
[nt:base] WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS 
NOT NULL ORDER BY FIRST([sling:vanityPath]), [jcr:path] OPTION (LIMIT 1000)
08.09.2022 16:17:57.525 *DEBUG* [Background Update 
org.apache.sling.resourceresolver (183)] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries dropping temporary 
resolver map - 0/10000 entries, 0 hits, 0 misses
08.09.2022 16:17:57.525 *ERROR* [Background Update 
org.apache.sling.resourceresolver (183)] 
org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl 
activate: Cannot access repository, failed setting up Mapping Support
org.apache.jackrabbit.oak.query.RuntimeNodeTraversalException: The query read 
or traversed more than 100000 nodes. To avoid affecting other tasks, processing 
was stopped.
{noformat}

What am I doing wrong?


> resource resolver: fails to detect aborted vanity path query
> ------------------------------------------------------------
>
>                 Key: SLING-11439
>                 URL: https://issues.apache.org/jira/browse/SLING-11439
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>            Reporter: Julian Reschke
>            Priority: Major
>
> With the introduction of the Oak query limit, JCR queries may get aborted 
> when the result set size exceeds a certain value (currently by default 
> 100000).
> However:
> https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/604332e9be17378276685033bdbce54994dad8c1/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResourceIterator.java#L115-L134
> So Apache Sling JCR Resource's API hides that exception, and thus resource 
> resolver will happily startup with an incomplete cache.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to