You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2022/08/15 11:14:00 UTC

[jira] [Commented] (SLING-11439) resource resolver: fails to detect aborted vanity path query

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

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

[~thomasm], re:

{noformat}
I think the query should be:

select [sling:vanityPath], [sling:redirect], [sling:redirectStatus] from [nt:base]
where first([sling:vanityPath]) >= $lastEntry
order by first([sling:vanityPath]), [jcr:path]

That way, even if we have more than 1000 entries for the same vanity path, and the limit is smaller than 1000, it would work fine. BUT you need to make sure you don't use "limit 1000", and read all the entries for a given value.
{noformat}

Can you explain how adding jcr:path to the query helps? How would I use that when restarting the query?

> 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)