muralibasani commented on code in PR #22458:
URL: https://github.com/apache/kafka/pull/22458#discussion_r3560161170


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java:
##########
@@ -804,9 +810,11 @@ record = partitionGroup.nextRecord(recordInfo, 
wallClockTime);
             log.trace("Task processed record: topic={}, partition={}, 
offset={}",
                 record.topic(), record.partition(), record.offset());
 
-            // after processing this record, if its partition queue's buffered 
size has been
-            // decreased to the threshold, we can then resume the consumption 
on this partition
-            if (recordInfo.queue().size() <= maxBufferedSize) {
+            // headRecordIsCorrupted() catches a queue whose only remaining 
records are corrupted —
+            // size() never drops below the legacy threshold, so without this 
we'd stay paused forever.
+            if (recordInfo.queue().isEmpty()

Review Comment:
   Good point. Agree. 
   The resume block is now gated on maxBufferedSize != 
UNDEFINED_MAX_BUFFERED_SIZE, so StreamTask owns resume only in count-mode. 
StreamThread.maybeResumePartitionsPausedForBufferOverflow is now the sole 
resume owner in bytes-mode. Updated tests too.



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