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

Thomas Mueller commented on SLING-11439:
----------------------------------------

I'm fine with either approach (I don't have a strong opinion). If we want to 
support this case, but don't want to use the query string approach (that would 
require a new Java API): one option would be to append something like "/* 
throws */" to the query - a bit similar to a Java method that throws. For 
example:

{noformat}
public static final String ITERATOR_CAN_THROW = "/* throws */"

String query = "select * from ... " +
    "order by ... " + ITERATOR_CAN_THROW;
request.getResourceResolver().findResources(query, "JCR-SQL2");
...
try {
} catch (...) {
    ...
}
{noformat}

Really just an idea. I agree it's a bit unusual.

> 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