Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1633

Introduce a protocol version to connection initiation message

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.4.6
    • server
    • None

    Description

      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

      Attachments

        1. ZOOKEEPER-1633-ver3.patch
          6 kB
          Alexander Shraer
        2. ZOOKEEPER-1633-ver2.patch
          6 kB
          Alexander Shraer
        3. ZOOKEEPER-1633-v4.patch
          20 kB
          Flavio Paiva Junqueira
        4. ZOOKEEPER-1633-v4.patch
          33 kB
          Flavio Paiva Junqueira
        5. ZOOKEEPER-1633.patch
          1 kB
          Alexander Shraer

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shralex Alexander Shraer
            shralex Alexander Shraer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment