zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shralex <...@git.apache.org>
Subject [GitHub] zookeeper pull request #315: ZOOKEEPER-2577: Fix flaky testDuringLeaderSync ...
Date Mon, 24 Jul 2017 20:44:58 GMT
Github user shralex commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/315#discussion_r129148693
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java ---
    @@ -1451,7 +1452,12 @@ public synchronized void restartLeaderElection(QuorumVerifier qvOLD,
QuorumVerif
         }
     
         public String getNextDynamicConfigFilename() {
    -        return configFilename + QuorumPeerConfig.nextDynamicConfigFileSuffix;
    +        if (configFilename != null) {
    --- End diff --
    
    A few comments:
    - It's be better if configFileName is never null. But that may be a bigger change that
we don't want to do here
    - If its null, it may be better to return null here and avoid calling writeDynamicConfig.

    - The calling test should either initiate configFileName properly or not rely on its existance
to check reconfig completion. You can do the latter by looking at the quorumVerified directly.




---
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