[
https://issues.apache.org/jira/browse/SLING-3812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14082080#comment-14082080
]
Carsten Ziegeler commented on SLING-3812:
-----------------------------------------
[~teofili] That would be great, you can find the search in the BackgroundLoader
class (method loadJobsInTheBackground(long)). I think a simple test case would
be to great lots of jobs and then use the search to find it. The problem right
now is, the search is not slow but simply throws an UOE which crashed the whole
thing. So in my opinion instead of letting the application silently crash, a
slow query would be a much better approach in my opinion. But I guess this has
all been discussed.
For the sake of the problem at hand, I'll change the code in the job handling
to first go with the search, if an UOE occurs fallback to traversal.
> Avoid search when loading jobs
> ------------------------------
>
> Key: SLING-3812
> URL: https://issues.apache.org/jira/browse/SLING-3812
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: Event 3.3.10
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: Event 3.3.12
>
>
> Using a search with Oak is problematic as it throws an
> UnsupportedOperationException when the search takes too long. This might
> happen when the job handling starts up and searches for all existing jobs.
> Simply put, using a search with Oak is not safe and needs to be avoided in
> this case - otherwise the job handling blows up as it is not expecting an
> UnsupportedOperationException. Even if it would, there is no way around this
> as the search is simply not executed.
> This worked fine with JR2
--
This message was sent by Atlassian JIRA
(v6.2#6252)