rite2nikhil commented on a change in pull request #9626: URL: https://github.com/apache/kafka/pull/9626#discussion_r539903721
########## File path: clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrRequest.java ########## @@ -138,14 +145,32 @@ public LeaderAndIsrResponse getErrorResponse(int throttleTimeMs, Throwable e) { Errors error = Errors.forException(e); responseData.setErrorCode(error.code()); - List<LeaderAndIsrPartitionError> partitions = new ArrayList<>(); - for (LeaderAndIsrPartitionState partition : partitionStates()) { - partitions.add(new LeaderAndIsrPartitionError() - .setTopicName(partition.topicName()) - .setPartitionIndex(partition.partitionIndex()) - .setErrorCode(error.code())); + if (version() < 5) { Review comment: may be i missed is there a test checking correctness of versioning ? ---------------------------------------------------------------- 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