danielgospodinow commented on code in PR #15479:
URL: https://github.com/apache/kafka/pull/15479#discussion_r1514907422


##########
clients/src/main/java/org/apache/kafka/clients/admin/internals/DeleteRecordsHandler.java:
##########
@@ -79,15 +79,15 @@ public static SimpleAdminApiFuture<TopicPartition, 
DeletedRecords> newFuture(
     @Override
     public DeleteRecordsRequest.Builder buildBatchedRequest(int brokerId, 
Set<TopicPartition> keys) {
         Map<String, DeleteRecordsRequestData.DeleteRecordsTopic> 
deletionsForTopic = new HashMap<>();
-        for (Map.Entry<TopicPartition, RecordsToDelete> entry: 
recordsToDelete.entrySet()) {
-            TopicPartition topicPartition = entry.getKey();
+        for (TopicPartition topicPartition : keys) {

Review Comment:
   Oooh, that makes complete sense now! Thanks a lot for the explanation, 
Andrew!



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

Reply via email to