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

Carsten Ziegeler commented on SLING-3392:
-----------------------------------------

This is about creating locks - so each instance in a cluster needs to create 
the exact same path for the same lock. if instance A creates the lock at 
12:20:58 and instance B tries this at 12:21:00 (which is very likely to 
happen), then both instances get the lock. Checking several paths to create the 
lock simply does not work and creates all kinds of concurrency problems.
Jackrabbit claims to handle 10.000 child nodes in a flat hierarchy, the locks 
are valid for two minutes. So as long as there are less jobs with locks in this 
time interval, we're fine. Please note, that the mechanism which starts to use 
locks within the job handling is deprecated for some time anyway, so clients 
should avoid it - and usually it is not needed anyway.
Oak handles flat hierarchies.
If I count all if this together, it's simply not worth adding a complicated and 
error prone mechanism in this area

> JobManager MaintenanceTask should not rely on search for removing locks
> -----------------------------------------------------------------------
>
>                 Key: SLING-3392
>                 URL: https://issues.apache.org/jira/browse/SLING-3392
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Event 3.3.4
>            Reporter: Amit Gupta
>            Assignee: Carsten Ziegeler
>             Fix For: Event 3.3.6
>
>
> org.apache.sling.event.impl.jobs.MaintenanceTask relies on search to find 
> obsolete locks and remove those.
> Search can fail for reasons such as index corruption. It should not rely on 
> search for such critical tasks.
> And, another issue with locks is that those are created in a flat hierarchy.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to