ableegoldman commented on a change in pull request #9446:
URL: https://github.com/apache/kafka/pull/9446#discussion_r505901801



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java
##########
@@ -704,8 +700,9 @@ private boolean assignTasksToClients(final Cluster 
fullMetadata,
                                          final Map<UUID, ClientMetadata> 
clientMetadataMap,
                                          final Map<TaskId, 
Set<TopicPartition>> partitionsForTask,
                                          final Set<TaskId> statefulTasks) {
-        if (!statefulTasks.isEmpty())
-            throw new IllegalArgumentException("The stateful tasks should not 
be populated before assigning tasks to clients");
+        if (!statefulTasks.isEmpty()) {
+            throw new TaskAssignmentException("The stateful tasks should not 
be populated before assigning tasks to clients");

Review comment:
       If we ever hit this it means there is a serious bug in the assignment 
algorithm. In that case we should go ahead and shut everyone down once we 
notice, since otherwise it would be a long slow death of single threads at a 
time




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


Reply via email to