You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/29 20:21:36 UTC

[GitHub] [kafka] guozhangwang commented on a diff in pull request #12363: HOTFIX: Correct ordering of input buffer and enforced processing sensors

guozhangwang commented on code in PR #12363:
URL: https://github.com/apache/kafka/pull/12363#discussion_r910380094


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java:
##########
@@ -797,8 +798,10 @@ void runOnce() {
                     totalProcessed += processed;
                     totalRecordsProcessedSinceLastSummary += processed;
                     final long bufferSize = taskManager.getInputBufferSizeInBytes();
-                    if (bufferSize <= maxBufferSizeBytes.get()) {
-                        mainConsumer.resume(mainConsumer.paused());
+                    if (bufferSize <= maxBufferSizeBytes.get() && !pausedPartitions.isEmpty()) {
+                        log.info("Buffered records size {} bytes falls below {}. Resuming all the paused partitions {} in the consumer",
+                            bufferSize, maxBufferSizeBytes.get(), pausedPartitions);
+                        mainConsumer.resume(pausedPartitions);

Review Comment:
   Ah yes!



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org