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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java:
##########
@@ -876,7 +880,11 @@ private void clearTaskTimeout(final Set<Task> tasks) {
     private void maybeInitTaskTimeoutOrThrow(final Set<Task> tasks,
                                              final Exception cause) {
         final long now = time.milliseconds();
-        tasks.forEach(t -> t.maybeInitTaskTimeoutOrThrow(now, cause));
+        tasks.forEach(t -> {
+            if (t != null) {

Review Comment:
   Not sure if we should do this? If we call this with a `null` tasks it's a 
bug. This change would hit the bug. I would rather let it crash with a NPE so 
we can get a bug report and fix the root cause of such an issue?
   
   I see that `clearTaskTimeout` has a similar `null` check which I find 
equally questionable. In both cases, it's IMHO the callers responsibility to 
ensure that the passed in `Set<Task>` does not contain any `null`s.
   
   I would even argue, that not having the existing `null` guard, would have 
expose this bug much earlier...
   
   Please let me know if you disagree, but I would instead drop the existing 
`null` guard, instead of add this one.



##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java:
##########
@@ -677,9 +677,13 @@ private void 
maybeUpdateLimitOffsetsForStandbyChangelogs(final Map<TaskId, Task>
             // for other changelog partitions we do not need to update limit 
offset at all since we never need to
             // check when it completes based on limit offset anyways: the end 
offset would keep increasing and the
             // standby never need to stop
+            // changelogs of paused tasks, which are not in tasks, are 
skipped: they are not restored until resumed, so
+            // their limit offsets are not needed, and their tasks cannot have 
their task timeout started when the

Review Comment:
   ```suggestion
               // their limit offsets are not needed, and their tasks shouldn't 
have their task timeout started when the
   ```



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