[ https://issues.apache.org/jira/browse/ZOOKEEPER-2080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15494088#comment-15494088 ]
Michael Han commented on ZOOKEEPER-2080: ---------------------------------------- Regarding [~fpj]'s comment on bq. I'm wondering why QuorumCnxManager.connectOne is synchronized on self, all it is trying to do is to connect to another server. The synchronization is introduced as part of ZOOKEEPER-107 ([reference|https://github.com/apache/zookeeper/commit/675ef85ba5cd97d69b875d14854b638da6f4423c#diff-1e15b8a38445193d635ac681fe37df67R409). I think the synchronization is required because this code check and react to state of QuorumPeer thus needs to synchronize with self as a whole. If we can get ride of the synchronization here, then both this JIRA and the potential deadlock spotted at {{QuorumPeer.restartLeaderElection}} can be fixed. I am not sure if that is feasible though. [~shralex]: Could you shed some lights on the motivation of synchronizing on self in QuorumCnxManager.connectOne and also, any possibilities we can get ride of the synchronization here? > ReconfigRecoveryTest fails intermittently > ----------------------------------------- > > Key: ZOOKEEPER-2080 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2080 > Project: ZooKeeper > Issue Type: Sub-task > Reporter: Ted Yu > Assignee: Michael Han > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, > ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, ZOOKEEPER-2080.patch, > jacoco-ZOOKEEPER-2080.unzip-grows-to-70MB.7z, repro-20150816.log, > threaddump.log > > > I got the following test failure on MacBook with trunk code: > {code} > Testcase: testCurrentObserverIsParticipantInNewConfig took 93.628 sec > FAILED > waiting for server 2 being up > junit.framework.AssertionFailedError: waiting for server 2 being up > at > org.apache.zookeeper.server.quorum.ReconfigRecoveryTest.testCurrentObserverIsParticipantInNewConfig(ReconfigRecoveryTest.java:529) > at > org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)