[ 
https://issues.apache.org/jira/browse/SLING-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marius Petria updated SLING-4853:
---------------------------------
    Attachment: SLING-4853.1.diff

[~cziegeler] I attached a new patch that fixes Utility.readJob against 
IllegalArgumentException which might by thrown by [1] jcr value map read. 

However this feels like not respecting abstraction and I am still thinking if 
it is not better to catch all RuntimeExceptions in readJob in order not to be 
implementation specific.


[1] 
https://github.com/apache/sling/blob/a3f25af5da1edb9f2719f04b560370c5cb6464c3/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrPropertyMap.java#L285

> JobManager.findJobs should skip items that have been removed during the call
> ----------------------------------------------------------------------------
>
>                 Key: SLING-4853
>                 URL: https://issues.apache.org/jira/browse/SLING-4853
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Marius Petria
>              Labels: event
>         Attachments: SLING-4853.1.diff, SLING-4853.diff
>
>
> Sometimes under high load the iteration over job nodes can fail [1] because 
> the nodes could be already processed and removed. We could by more fault 
> tolerant when reading a resource and just skip it in case of failure.
> {noformat}
> Caused by: java.lang.IllegalStateException: Failed to retrieve path from Item:
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResource.getPath(JcrItemResource.java:82)
> at 
> org.apache.sling.event.impl.jobs.JobManagerImpl.findJobs(JobManagerImpl.java:659)
> at 
> com.day.cq.replication.impl.queue.ReplicationQueueImpl.entries(ReplicationQueueImpl.java:144)
> Caused by: javax.jcr.InvalidItemStateException: This item does not exist 
> anymore
> at 
> org.apache.jackrabbit.oak.jcr.delegate.ItemDelegate.checkAlive(ItemDelegate.java:85)
> at 
> org.apache.jackrabbit.oak.jcr.session.operation.ItemOperation.checkPreconditions(ItemOperation.java:34)
> at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:289)
> at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:113)
> at org.apache.jackrabbit.oak.jcr.session.ItemImpl.getPath(ItemImpl.java:153)
> {noformat}
> [1] 
> https://github.com/apache/sling/blob/29420e3482d610c1dd9741276388670474026bf6/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java#L662



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to