You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by some one <zk...@gmail.com> on 2014/09/23 22:35:22 UTC

Re: Review Request 25745: ZOOKEEPER-2031 Support tagging a QuorumServer

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25745/
-----------------------------------------------------------

(Updated Sept. 23, 2014, 8:35 p.m.)


Review request for zookeeper, michim and Alexander Shraer.


Repository: zookeeper-git


Description
-------

Currently ZooKeeper only allows using the server id which is an integer for identifying servers. For my (unavoidable) use case, there may be concurrent dynamic removes and adds of servers which may eventually have id collisions. When this occurs, there is no good way to determine if the server (given an id collision) that we want to remove is the right server.
To support my use case, I propose that we add a tag field to the server string.
For my specific use case, this tag field will be used to store a uuid as a string.
So for example:
server.1=127.0.0.1:1234:1236:participant;0.0.0.0:1237;743b9d23-85cb-45b1-8949-930fdabb21f0

Additionally, by adding a tag, we can now ensure that clusters with overlapping server ip/port configurations, do not interfere with one another if the servers are tagged uniquely.


Diffs
-----

  src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java dfe692f4889a11b8a8eb3a4cbbd150ed5cac6a9f 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 388ceeb45bd18c7cb8f0766a96ebd4a54a9e76de 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumServerTest.java c75835456dcc7113c0a91a2ba7102f18352d3055 

Diff: https://reviews.apache.org/r/25745/diff/


Testing
-------

Updated and ran QuorumServerTest

Manually ran a test where I started up cluster 1 (composed of nodes A and B), and then take A down permanently without removing it from cluster 1.
Then I started up cluster 2 with one server, A' (same server string as A but different tag) and confirmed that it does not get synced with cluster 1.
Then I verified that I could reconfig add another node C to cluster 2.


Thanks,

some one


Re: Review Request 25745: ZOOKEEPER-2031 Support tagging a QuorumServer

Posted by some one <zk...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25745/
-----------------------------------------------------------

(Updated Sept. 24, 2014, 2:27 a.m.)


Review request for zookeeper, michim and Alexander Shraer.


Changes
-------

Added two test cases to verify the behavior of the syncing for overlapping servers with the same tags (and different tags).

The commented out test may be removed (or uncommented after updating ZK Server to support the asserted behavior) in the final patch depending on the outcome of the thread on issues.apache.org


Repository: zookeeper-git


Description
-------

Currently ZooKeeper only allows using the server id which is an integer for identifying servers. For my (unavoidable) use case, there may be concurrent dynamic removes and adds of servers which may eventually have id collisions. When this occurs, there is no good way to determine if the server (given an id collision) that we want to remove is the right server.
To support my use case, I propose that we add a tag field to the server string.
For my specific use case, this tag field will be used to store a uuid as a string.
So for example:
server.1=127.0.0.1:1234:1236:participant;0.0.0.0:1237;743b9d23-85cb-45b1-8949-930fdabb21f0

Additionally, by adding a tag, we can now ensure that clusters with overlapping server ip/port configurations, do not interfere with one another if the servers are tagged uniquely.


Diffs (updated)
-----

  src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java dfe692f 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 388ceeb 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumServerTest.java c758354 
  src/java/test/org/apache/zookeeper/test/QuorumUtil.java cd6ed29 
  src/java/test/org/apache/zookeeper/test/ReconfigTest.java 8b238ee 

Diff: https://reviews.apache.org/r/25745/diff/


Testing
-------

Updated and ran QuorumServerTest

Manually ran a test where I started up cluster 1 (composed of nodes A and B), and then take A down permanently without removing it from cluster 1.
Then I started up cluster 2 with one server, A' (same server string as A but different tag) and confirmed that it does not get synced with cluster 1.
Then I verified that I could reconfig add another node C to cluster 2.


Thanks,

some one