hachikuji commented on a change in pull request #9008: URL: https://github.com/apache/kafka/pull/9008#discussion_r456660379
########## File path: clients/src/main/java/org/apache/kafka/common/requests/FetchRequest.java ########## @@ -492,74 +327,51 @@ public int maxBytes() { } public boolean isFromFollower() { - return replicaId >= 0; + return replicaId() >= 0; } public IsolationLevel isolationLevel() { - return isolationLevel; + return IsolationLevel.forId(data.isolationLevel()); } public FetchMetadata metadata() { return metadata; } public String rackId() { - return rackId; + return data.rackId(); } public static FetchRequest parse(ByteBuffer buffer, short version) { - return new FetchRequest(ApiKeys.FETCH.parseRequest(version, buffer), version); + ByteBufferAccessor accessor = new ByteBufferAccessor(buffer); + FetchRequestData message = new FetchRequestData(); + message.read(accessor, version); + return new FetchRequest(message, version); + } + + @Override + public ByteBuffer serialize(RequestHeader header) { Review comment: I'm ok saving this for #7409. ---------------------------------------------------------------- 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