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


##########
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:
   I'm having trouble understanding how changing the iteration over 
`recordsToDelete` to `keys` resolves the issue. May I ask for a quick 
explanation?



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