symat commented on a change in pull request #1251: ZOOKEEPER-3720: Fix rolling upgrade failure (invalid protocol version) URL: https://github.com/apache/zookeeper/pull/1251#discussion_r378466027
########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ########## @@ -113,9 +115,12 @@ private AtomicLong observerCounter = new AtomicLong(-1); /* - * Protocol identifier used among peers + * Protocol identifier used among peers (must be a negative number for backward compatibility reasons) */ - public static final long PROTOCOL_VERSION = -65535L; + // the following protocol version was sent in every connection initiation message since ZOOKEEPER-2186 released in 3.4.7 + public static final long PROTOCOL_VERSION_3_4_7 = -65536L; Review comment: The reason why I named this way was that I am not sure if we won't need to add other previous versions later (e.g. to support rolling restart from pre-3.4.7 versions). But giving a second thought, I like your proposal better. These are just constants, we can rename them later in any ways. I will change this in the next commit. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services