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.
---