zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cami...@apache.org
Subject svn commit: r1156649 - in /zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/Leader.java
Date Thu, 11 Aug 2011 15:19:15 GMT
Author: camille
Date: Thu Aug 11 15:19:15 2011
New Revision: 1156649

URL: http://svn.apache.org/viewvc?rev=1156649&view=rev
Log:
ZOOKEEPER-1144: ZooKeeperServer not starting on leader due to a race condition (Vishal K via
camille)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1156649&r1=1156648&r2=1156649&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Thu Aug 11 15:19:15 2011
@@ -273,6 +273,8 @@ BUGFIXES: 
   ZOOKEEPER-1139. jenkins is reporting two warnings, fix these (phunt via mahadev)
 
   ZOOKEEPER-1142. incorrect stat output (phunt via mahadev)
+  
+  ZOOKEEPER-1144. ZooKeeperServer not starting on leader due to a race condition (Vishal
K via camille)
 
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 

Modified: zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java?rev=1156649&r1=1156648&r2=1156649&view=diff
==============================================================================
--- zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java (original)
+++ zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java Thu Aug 11
15:19:15 2011
@@ -326,6 +326,7 @@ public class Leader {
                         + Long.toHexString(newLeaderProposal.packet.getZxid()));
             }
             outstandingProposals.put(newLeaderProposal.packet.getZxid(), newLeaderProposal);
+            newLeaderProposal.ackSet.add(self.getId());
             
             readyToStart = true;
             waitForEpochAck(self.getId(), leaderStateSummary);
@@ -334,7 +335,6 @@ public class Leader {
             // We have to get at least a majority of servers in sync with
             // us. We do this by waiting for the NEWLEADER packet to get
             // acknowledged
-            newLeaderProposal.ackSet.add(self.getId());
             while (!self.getQuorumVerifier().containsQuorum(newLeaderProposal.ackSet)){
             //while (newLeaderProposal.ackCount <= self.quorumPeers.size() / 2) {
                 if (self.tick > self.initLimit) {



Mime
View raw message