TaiJuWu commented on code in PR #16463:
URL: https://github.com/apache/kafka/pull/16463#discussion_r1839868916


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java:
##########
@@ -1023,20 +1038,29 @@ public long nextExpiryTimeMs() {
     }
 
       /* Visible for testing */
-    public Deque<ProducerBatch> getDeque(TopicPartition tp) {
+    Deque<ProducerBatch> getDeque(TopicPartition tp, Short acks) {
         TopicInfo topicInfo = topicInfoMap.get(tp.topic());
         if (topicInfo == null)
             return null;
-        return topicInfo.batches.get(tp.partition());
+        return topicInfo.batchesWithAcks.get(acks).get(tp.partition());
+    }
+
+    List<Deque<ProducerBatch>> getAllDequeueForPartition(TopicPartition tp) {
+        TopicInfo topicInfo = topicInfoMap.get(tp.topic());
+        if (topicInfo == null)
+            return null;
+        List<Deque<ProducerBatch>> res = new ArrayList<>();
+        topicInfo.batchesWithAcks.forEach((acks, batches) -> 
batches.forEach((topicPartition, dq) -> res.add(dq)));

Review Comment:
   Mistake



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to