zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #247: Potential server deadlock between follower sync...
Date Sat, 06 May 2017 05:18:23 GMT
Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/247#discussion_r115113425
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -682,27 +682,19 @@ public void setQuorumAddress(InetSocketAddress addr){
         }
     
         public InetSocketAddress getElectionAddress(){
    -        synchronized (QV_LOCK) {
    -            return myElectionAddr;
    -        }
    +        return myElectionAddr;
    --- End diff --
    
    Note this synchronization was introduced as part of ZOOKEEPER-2080 (which fixed a separate
dead lock issue.). The intent was to protect access on these states while a reconfig operation
is in flight, but my analysis indicate it might be totally fine without these synchronizations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message