[
https://issues.apache.org/jira/browse/BOOKKEEPER-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13993405#comment-13993405
]
Rakesh R commented on BOOKKEEPER-747:
-------------------------------------
Thanks again [~fpj], it looks nice. I've one small suggestion:
Kindly do logs inside synchronized block or have a copy of the list and pass it
to logger. There could be again chance of ConcurrentModificationException,
while logging it will iterate over the collection, isn't it ?
{code}
LOG.debug("Removed ledger metadata listeners on ledger {} :
{}",
ledgerId, listenerSet);
+ synchronized(listenerSet){
+ for(LedgerMetadataListener l : listenerSet) {
+ unregisterLedgerMetadataListener(ledgerId, l);
+ l.onChanged( ledgerId, null );
+ }
+ }
{code}
Apart from this +1 from me.
> 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-4.2.patch, BOOKKEEPER-747-4.2.patch,
> BOOKKEEPER-747.patch, BOOKKEEPER-747.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)