You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by eo...@apache.org on 2020/06/19 07:55:39 UTC

[zookeeper] branch master updated: ZOOKEEPER-3865: fix backward-compatibility for ZooKeeperServer constructor

This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new f6c9bac  ZOOKEEPER-3865: fix backward-compatibility for ZooKeeperServer constructor
f6c9bac is described below

commit f6c9bac7d39e790171762e522fedb7b3af66d3c7
Author: Mate Szalay-Beko <sy...@apache.org>
AuthorDate: Fri Jun 19 09:55:12 2020 +0200

    ZOOKEEPER-3865: fix backward-compatibility for ZooKeeperServer constructor
    
    In the fix of ZOOKEEPER-3829 I accidentally changed a public constructor of ZooKeeper server. I didn’t realize Curator is using it for testing (and maybe other Apache projects are doing so as well).
    
    In this PR I restore the original constructor for master and branch-3.6.
    
    For branch-3.5 I will submit an other PR, that will make it compatible with e.g. Curator 4.3.
    
    Author: Mate Szalay-Beko <sy...@apache.org>
    
    Reviewers: Enrico Olivelli <eo...@apache.org>
    
    Closes #1382 from symat/ZOOKEEPER-3865
---
 .../main/java/org/apache/zookeeper/server/ZooKeeperServer.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java b/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
index c391425..9d09024 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
@@ -301,7 +301,14 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
     }
 
     /**
-     * Creates a ZooKeeperServer instance. It sets everything up, but doesn't
+     * Keeping this constructor for backward compatibility
+     */
+    public ZooKeeperServer(FileTxnSnapLog txnLogFactory, int tickTime, int minSessionTimeout, int maxSessionTimeout, int clientPortListenBacklog, ZKDatabase zkDb, String initialConfig) {
+        this(txnLogFactory, tickTime, minSessionTimeout, maxSessionTimeout, clientPortListenBacklog, zkDb, initialConfig, QuorumPeerConfig.isReconfigEnabled());
+    }
+
+    /**
+     *  * Creates a ZooKeeperServer instance. It sets everything up, but doesn't
      * actually start listening for clients until run() is invoked.
      *
      */