jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-1290) ObservationManager#removeEventListener prone to deadlocks
Date Mon, 16 Dec 2013 11:06:09 GMT

    [ https://issues.apache.org/jira/browse/OAK-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849037#comment-13849037

Michael Dürig commented on OAK-1290:

I suggest to implement a best effort approach to that contract: wait a couple of seconds for
the executing event listener to return. If it fails to do so, log a warning and return. 

> ObservationManager#removeEventListener prone to deadlocks 
> ----------------------------------------------------------
>                 Key: OAK-1290
>                 URL: https://issues.apache.org/jira/browse/OAK-1290
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: Michael Dürig
> The contract for {{ObservationManager#removeEventListener}} mandates: "A listener may
be deregistered while it is being executed. The deregistration method will block until the
listener has completed executing."
> However a strict implementation of this contract is prone to deadlocks: clients unregistering
event listeners need to take care not to hold a lock that is also acquired from the event
listener being unregistered as this will lead to a deadlock

This message was sent by Atlassian JIRA

View raw message