You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by jtuple <gi...@git.apache.org> on 2018/08/03 18:40:28 UTC
[GitHub] zookeeper pull request #580: ZOOKEEPER-3098: Add additional server metrics
Github user jtuple commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/580#discussion_r207633573
--- Diff: src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java ---
@@ -271,7 +271,7 @@ private boolean checkFourLetterWord(final Channel channel,
String cmd = FourLetterCommands.getCommandString(len);
channel.setInterestOps(0).awaitUninterruptibly();
- packetReceived();
+ packetReceived(4);
--- End diff --
`packetReceived()` now takes in the packet-size as an argument to update the packets received metric. The total packet size consists of packet header (4 bytes) + packet size. For "four letter words", there is no packet size -- just the 4-byte packet header.
---