You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/05/21 15:17:25 UTC

[GitHub] [zookeeper] shralex commented on a change in pull request #1356: ZOOKEEPER-3829: backward compatibility fix for rolling restart without dynamic reconfig

shralex commented on a change in pull request #1356:
URL: https://github.com/apache/zookeeper/pull/1356#discussion_r428720677



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java
##########
@@ -614,7 +614,7 @@ void lead() throws IOException, InterruptedException {
 
             QuorumVerifier lastSeenQV = self.getLastSeenQuorumVerifier();
             QuorumVerifier curQV = self.getQuorumVerifier();
-            if (curQV.getVersion() == 0 && curQV.getVersion() == lastSeenQV.getVersion()) {
+            if (!QuorumPeerConfig.isReconfigEnabled() || (curQV.getVersion() == 0 && curQV.getVersion() == lastSeenQV.getVersion())) {

Review comment:
       Could you explain the "!QuorumPeerConfig.isReconfigEnabled() || " here ? And not, e.g., "QuorumPeerConfig.isReconfigEnabled() &&"
   
   The previous condition means this is done only when the config is an initial one. What's being done here is updating the config version to the current leader zxid. This is done only once, when the ensemble is initial.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org