[ https://issues.apache.org/jira/browse/ZOOKEEPER-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13820599#comment-13820599 ]
Raul Gutierrez Segales commented on ZOOKEEPER-1808: --------------------------------------------------- Some stylistic nits: {noformat} + requestBuffer.putLong(epoch); + requestBuffer.putInt( Notification.CURRENTVERSION ); {noformat} no spaces between parenthesis and parameters. {noformat} + if(response.buffer.remaining() >= 4) { + n.version = response.buffer.getInt(); + } else { + n.version = 0x0; + } {noformat} More succinct: {noformat} + n.version ? response.buffer.remaining() >= 4 : 0x0; {noformat} Nit: {noformat} private void printNotification(Notification n){ - LOG.info("Notification: " + n.leader + " (n.leader), 0x" + LOG.info("Notification: " + Long.toHexString(n.version) + " (message format version), " ... {noformat} Maybe that belongs as toString inside Notification? Super nit: there's two extra newlines in src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java. > Add version to FLE notifications for 3.4 branch > ----------------------------------------------- > > Key: ZOOKEEPER-1808 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1808 > Project: ZooKeeper > Issue Type: Sub-task > Reporter: Flavio Junqueira > Assignee: Flavio Junqueira > Fix For: 3.4.6 > > Attachments: ZOOKEEPER-1808.patch, ZOOKEEPER-1808.patch, > ZOOKEEPER-1808.patch, ZOOKEEPER-1808.patch, ZOOKEEPER-1808.patch, > ZOOKEEPER-1808.patch, ZOOKEEPER-1808.patch > > > Add version to notification messages so that we can differentiate messages > during rolling upgrades. This task is for the 3.4 branch only. -- This message was sent by Atlassian JIRA (v6.1#6144)