cadonna commented on code in PR #13927:
URL: https://github.com/apache/kafka/pull/13927#discussion_r1257910205


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -571,7 +571,9 @@ private Map<TaskId, Set<TopicPartition>> 
pendingTasksToCreate(final Map<TaskId,
         while (iter.hasNext()) {
             final Map.Entry<TaskId, Set<TopicPartition>> entry = iter.next();
             final TaskId taskId = entry.getKey();
-            if (taskId.topologyName() != null && 
!topologyMetadata.namedTopologiesView().contains(taskId.topologyName())) {
+            final boolean taskIsOwned = tasks.allTaskIds().contains(taskId)

Review Comment:
   The idea was to make the code more readable since the condition is quite 
complex but it actually just verifies that a task is owned. I prefer to use an 
additional variable or method rather than use complex logical conditions that 
give the reader a hard time. So, I would rather keep the variable.



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