dajac commented on a change in pull request #10234:
URL: https://github.com/apache/kafka/pull/10234#discussion_r586310444



##########
File path: 
clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrRequest.java
##########
@@ -145,24 +145,21 @@ public LeaderAndIsrResponse getErrorResponse(int 
throttleTimeMs, Throwable e) {
                         .setErrorCode(error.code()));
             }
             responseData.setPartitionErrors(partitions);
-            return new LeaderAndIsrResponse(responseData, version());
-        }
-
-        List<LeaderAndIsrTopicError> topics = new 
ArrayList<>(data.topicStates().size());
-        Map<String, Uuid> topicIds = topicIds();
-        for (LeaderAndIsrTopicState topicState : data.topicStates()) {
-            LeaderAndIsrTopicError topicError = new LeaderAndIsrTopicError();
-            topicError.setTopicId(topicIds.get(topicState.topicName()));
-            List<LeaderAndIsrPartitionError> partitions = new 
ArrayList<>(topicState.partitionStates().size());
-            for (LeaderAndIsrPartitionState partition : 
topicState.partitionStates()) {
-                partitions.add(new LeaderAndIsrPartitionError()
+        } else {
+            for (LeaderAndIsrTopicState topicState : data.topicStates()) {
+                List<LeaderAndIsrPartitionError> partitions = new ArrayList<>(
+                    topicState.partitionStates().size());
+                for (LeaderAndIsrPartitionState partition : 
topicState.partitionStates()) {
+                    partitions.add(new LeaderAndIsrPartitionError()
                         .setPartitionIndex(partition.partitionIndex())

Review comment:
       Ack. So let's keep it as is.




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


Reply via email to