Skip to content

Commit

Permalink
ZOOKEEPER-3865: fix backward-compatibility for ZooKeeperServer constr…
Browse files Browse the repository at this point in the history
…uctor

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 branch-3.5 making it compatible with e.g. Curator 4.3.

Author: Mate Szalay-Beko <symat@apache.org>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes #1383 from symat/ZOOKEEPER-3865-branch-3.5
  • Loading branch information
symat authored and eolivelli committed Jun 23, 2020
1 parent a97526b commit 96002ff
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,14 @@ public ZooKeeperServer() {
}

/**
* 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, ZKDatabase zkDb) {
this(txnLogFactory, tickTime, minSessionTimeout, maxSessionTimeout, zkDb, QuorumPeerConfig.isReconfigEnabled());
}

/**
* * Creates a ZooKeeperServer instance. It sets everything up, but doesn't
* actually start listening for clients until run() is invoked.
*
* @param dataDir the directory to put the data
Expand Down

0 comments on commit 96002ff

Please sign in to comment.