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

Rakesh R commented on BOOKKEEPER-747:
-------------------------------------

bq.What can go wrong if we don't synchronize listenerSet in AbstractZK?

Say in worst case it can occur 'java.util.ConcurrentModificationException'

Thread1: AbstractZK#unregisterLedgerMetadataListener -> removes the listener 
from listenerSet
Thread2: AbstractZK#operationComplete -> iterating over the listenerSet, here 
this will throw ConcurrentModificationException.

> Implement register/unregister LedgerMetadataListener in MSLedgerManagerFactory
> ------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-747
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-747
>             Project: Bookkeeper
>          Issue Type: Improvement
>    Affects Versions: 4.3.0, 4.2.3
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>             Fix For: 4.3.0, 4.2.3
>
>         Attachments: BOOKKEEPER-747-4.2.patch, BOOKKEEPER-747-4.2.patch, 
> BOOKKEEPER-747-4.2.patch, BOOKKEEPER-747.patch, BOOKKEEPER-747.patch, 
> BOOKKEEPER-747.patch, BOOKKEEPER-747.patch, BOOKKEEPER-747.patch
>
>
> Check TODOs in MSLedgerManagerFactory.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to