[
https://issues.apache.org/jira/browse/ZOOKEEPER-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572961#comment-13572961
]
Alexander Shraer commented on ZOOKEEPER-1633:
---------------------------------------------
Just to clarify - this patch enables upgrade from 3.4 to 3.5, but the upgrade
has to go through 3.4.6.
If a 3.5.0 server attempts to connect to a 3.4.5 server, this is the error that
will be produced (the negative server id is in fact the protocol number which
is sent first by 3.5.0):
2013-01-30 11:32:10,663 [myid:2] - INFO
[localhost/127.0.0.1:2784:QuorumCnxManager$Listener@498] - Received connection
request /127.0.0.1:60876
2013-01-30 11:32:10,663 [myid:2] - WARN
[localhost/127.0.0.1:2784:QuorumCnxManager@349] - Invalid server id: -65536
2013-01-30 11:32:11,466 [myid:2] - INFO
[localhost/127.0.0.1:2784:QuorumCnxManager$Listener@498] - Received connection
request /127.0.0.1:60878
2013-01-30 11:32:11,467 [myid:2] - WARN
[localhost/127.0.0.1:2784:QuorumCnxManager@349] - Invalid server id: -65536
2013-01-30 11:32:13,069 [myid:2] - INFO
[localhost/127.0.0.1:2784:QuorumCnxManager$Listener@498] - Received connection
request /127.0.0.1:60880
2013-01-30 11:32:13,070 [myid:2] - WARN
[localhost/127.0.0.1:2784:QuorumCnxManager@349] - Invalid server id: -65536
2013-01-30 11:32:16,273 [myid:2] - INFO
[localhost/127.0.0.1:2784:QuorumCnxManager$Listener@498] - Received connection
request /127.0.0.1:60882
2013-01-30 11:32:16,273 [myid:2] - WARN
[localhost/127.0.0.1:2784:QuorumCnxManager@349] - Invalid server id: -65536
> Introduce a protocol version to connection initiation message
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-1633
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1633
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Reporter: Alexander Shraer
> Assignee: Alexander Shraer
> Fix For: 3.4.6
>
> Attachments: ZOOKEEPER-1633.patch
>
>
> Currently the first message a server sends to another server includes just
> one field - the server's id (long). This is in QuorumCnxManager.java. This
> makes changes to the information passed during this initial connection very
> difficult. This patch will change the first field of the message to be a
> protocol version (a negative number that can't be a server id). The second
> field will be the server id. The third field is number of bytes in the
> remainder of the message. A 3.4 server will read the first field as before,
> but if this is a negative number it will read the second field to find the
> server id, and then remove the remainder of the message from the stream. This
> will not affect 3.4 since 3.4 and earlier servers send just the server id (so
> the code in the patch will not run unless there is a server > 3.4 trying to
> connect). This will, however, provide the necessary flexibility for future
> releases as well as an upgrade path from 3.4
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira