[GitHub] [kafka] wcarlson5 commented on a change in pull request #10565: KAFKA-12691: Add case where task can be considered idling

2021-04-21 Thread GitBox


wcarlson5 commented on a change in pull request #10565:
URL: https://github.com/apache/kafka/pull/10565#discussion_r617857575



##
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
##
@@ -667,8 +668,15 @@ public boolean isProcessable(final long wallClockTime) {
 // thus, the task is not processable, even if there is available 
data in the record queue
 return false;
 }
-
-return partitionGroup.readyToProcess(wallClockTime);
+final boolean readyToProcess = 
partitionGroup.readyToProcess(wallClockTime);
+if (!readyToProcess) {
+if (!timeCurrentIdlingStarted.isPresent()) {
+timeCurrentIdlingStarted = Optional.of(wallClockTime);
+}
+} else {
+timeCurrentIdlingStarted = Optional.empty();

Review comment:
   Yes that sounds like what I was thinking




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

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




[GitHub] [kafka] wcarlson5 commented on a change in pull request #10565: KAFKA-12691: Add case where task can be considered idling

2021-04-20 Thread GitBox


wcarlson5 commented on a change in pull request #10565:
URL: https://github.com/apache/kafka/pull/10565#discussion_r617150453



##
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
##
@@ -692,6 +699,7 @@ public boolean process(final long wallClockTime) {
 return false;
 }
 }
+timeCurrentIdlingStarted = Optional.empty();

Review comment:
   Alright will remove then




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

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




[GitHub] [kafka] wcarlson5 commented on a change in pull request #10565: KAFKA-12691: Add case where task can be considered idling

2021-04-20 Thread GitBox


wcarlson5 commented on a change in pull request #10565:
URL: https://github.com/apache/kafka/pull/10565#discussion_r616777330



##
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
##
@@ -692,6 +699,7 @@ public boolean process(final long wallClockTime) {
 return false;
 }
 }
+timeCurrentIdlingStarted = Optional.empty();

Review comment:
   My thought was if the record becomes not null after It was not 
processable in the previous iteration we would not call isProcessable. Is this 
case guaranteed not to happen? If so we don't need this




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

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