mjsax commented on code in PR #20693:
URL: https://github.com/apache/kafka/pull/20693#discussion_r2501364694
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskExecutionMetadata.java:
##########
@@ -63,16 +68,52 @@ public ProcessingMode processingMode() {
public boolean canProcessTask(final Task task, final long now) {
final String topologyName = task.id().topologyName();
+ final boolean taskWasReady =
!taskToLastNotReadyLogTime.containsKey(task.id());
+ final boolean canProcess;
+ final String logMessage;
+
if (!hasNamedTopologies) {
// TODO implement error handling/backoff for non-named topologies
(needs KIP)
- return !pausedTopologies.contains(UNNAMED_TOPOLOGY);
+ logMessage = String.format("Task %s processing check for unnamed
topology '%s'", task.id(), topologyName);
+ canProcess = !pausedTopologies.contains(UNNAMED_TOPOLOGY);
} else {
if (pausedTopologies.contains(topologyName)) {
- return false;
+ canProcess = false;
+ logMessage = String.format("Task %s can't be processed:
topology '%s' is paused", task.id(), topologyName);
} else {
+ logMessage = String.format("Task %s processing check for named
topology '%s'", task.id(), topologyName);
Review Comment:
As above. Should we move this after `canProcess = metadata == null ||
(metadata.canProcess() && metadata.canProcessTask(task, now));` and have a
different message depending if `canProcess` is true vs false?
--
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]