Skip to content

Commit

Permalink
Disable Zookeeper multi address (#855)
Browse files Browse the repository at this point in the history
Motivation:

Zookeeper 3.6 added a new option that was ability to set multiple adders
for quorum operations. apache/zookeeper#1048 The
multi address was not compatible with the old protocol used in ZooKeeper
3.5.x, so apache/zookeeper#1251 has disabled the
option.

During fixing incompatibility in
apache/zookeeper#1251, it omitted to change the
default value of `QuorumPeer.multiAddressEnabled` to `false`.

https://github.com/apache/zookeeper/blob/e08cc2a782982964a57651f179a468b19e2e6010/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java#L174-L180
The default is correctly set to false when a Zookeeper server is used as
a standalone mode. However, if a new `QuorumPeer` instance is manually
created, it will remain `true.`

Since CentralDogma directly extends `QuorumPeer`,
`zookeeper.multiadress` is activated automatically and Central Dogma
using Zookeeper 3.5.x can't be upgraded with a rolling deployment.

Modifications:

- Set `multiAddressEnabled` to false when creating `EmbeddedZooKeeper`

Result:

- Fixed an issue where CentralDogma does not perform rolling updates due
to the invalid protocol version of Zookeeper.
  - Note that this bug affects 0.61.2, 0.61.3 and 0.61.4
  • Loading branch information
ikhoon authored Jul 17, 2023
1 parent 69572e1 commit 18e2b94
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ final class EmbeddedZooKeeper extends QuorumPeer {
setLearnerType(zkCfg.getPeerType());
setSyncEnabled(zkCfg.getSyncEnabled());
setQuorumListenOnAllIPs(zkCfg.getQuorumListenOnAllIPs());
setMultiAddressEnabled(false);

configureSasl();

Expand Down

0 comments on commit 18e2b94

Please sign in to comment.