Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Zookeeper multi address #855

Merged
merged 1 commit into from
Jul 17, 2023
Merged

Conversation

ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Jul 10, 2023

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

Motivation:

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

In apache/zookeeper#1251, the default value of
`QuorumPeer.multiAddressEnabled` was changed.
https://github.com/apache/zookeeper/blob/e08cc2a782982964a57651f179a468b19e2e6010/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java#L174-L180
Since CentralDogma directly extends `QuorumPeer`, `zookeeper.multiadress`
is activated automatically and Central Dogma using Zookeeper 3.5.x
can't be upgraded with rolling deployment.

Modifications:

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

Result:

- Fixed an issue where CentralDogma does not perform rolling updates due to Zookeeper invalid protocol version.
  - Note that this bug affects 0.61.2, 0.61.3 and 0.61.4
@ikhoon ikhoon added the defect label Jul 10, 2023
@ikhoon ikhoon added this to the 0.61.5 milestone Jul 10, 2023
Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thanks!

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.03 🎉

Comparison is base (69572e1) 64.82% compared to head (c1e7967) 64.85%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #855      +/-   ##
============================================
+ Coverage     64.82%   64.85%   +0.03%     
- Complexity     3280     3283       +3     
============================================
  Files           356      356              
  Lines         13961    13962       +1     
  Branches       1499     1499              
============================================
+ Hits           9050     9055       +5     
+ Misses         4059     4058       -1     
+ Partials        852      849       -3     
Impacted Files Coverage Δ
...server/internal/replication/EmbeddedZooKeeper.java 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@jrhee17 jrhee17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ikhoon 🙇 👍 🚀

@trustin trustin merged commit 18e2b94 into line:main Jul 17, 2023
@ikhoon ikhoon deleted the disable-mutladdress branch July 17, 2023 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants