[ https://issues.apache.org/jira/browse/BOOKKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547537#comment-13547537 ]
Uma Maheswara Rao G commented on BOOKKEEPER-538: ------------------------------------------------ DO you think we have to handle this at BookieClient itself. Client should not allow to open any new channels after closed it right? Not sure I missed something here. Current patch also looks good and ensuring all executors stopped before waiting to releaseExternalResources. I think this is the Jetty behavior that if there are any channels in open state then this will hang. I have just seen an open issue in Jetty as well JETTY-391 similar to it. On answering the first comment +1 on this patch as this can fix the issue as well. > Race condition in BookKeeper#close > ---------------------------------- > > Key: BOOKKEEPER-538 > URL: https://issues.apache.org/jira/browse/BOOKKEEPER-538 > Project: Bookkeeper > Issue Type: Bug > Reporter: Ivan Kelly > Assignee: Ivan Kelly > Fix For: 4.2.0 > > Attachments: > 0001-BOOKKEEPER-538-Race-condition-in-BookKeeper-close.patch > > > I've seen this with BookieAutoRecoveryTest. Basically, we interrupt and join > the replicationworker thread, and then close the BookKeeper instance. This > can have caused a bookkeeper operation that never finished. The executor runs > it after #close has closed the BookieClient. The operation opens a connection > and therefore we get a hang on releaseExternalResources(). > Solution is pretty simple. We should shutdown all executors before closing > the bookieClient. I'll attach a patch which does this. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira