mjsax commented on code in PR #17919:
URL: https://github.com/apache/kafka/pull/17919#discussion_r1855018415


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/PartitionGroup.java:
##########
@@ -250,10 +250,11 @@ StampedRecord nextRecord(final RecordInfo info, final 
long wallClockTime) {
 
         if (queue != null) {
             // get the first record from this queue.
+            final int oldSize = queue.size();
             record = queue.poll(wallClockTime);
 
             if (record != null) {
-                --totalBuffered;
+                totalBuffered -= (oldSize - queue.size());

Review Comment:
   This is a follow up fix: when we skip more than one corrupted record, we 
don't update the buffer size correctly.



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