showuon commented on code in PR #12916: URL: https://github.com/apache/kafka/pull/12916#discussion_r1034332922
########## clients/src/main/java/org/apache/kafka/common/requests/RequestHeader.java: ########## @@ -118,7 +118,6 @@ public static RequestHeader parse(ByteBuffer buffer) { // We derive the header version from the request api version, so we read that first. // The request api version is part of `RequestHeaderData`, so we reset the buffer position after the read. int position = buffer.position(); - int requestHeaderSize = buffer.remaining(); Review Comment: This is not correct. The buffer in the payload is actually [header + message]. So, if we do `buffer.remaining()` here, we'll get the wrong header size. Fix it by removing the cache setting here. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org