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



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java
##########
@@ -409,9 +396,18 @@ public GroupAssignment assign(final Cluster metadata, 
final GroupSubscription gr
                 minSupportedMetadataVersion,
                 versionProbing,
                 probingRebalanceNeeded
-        );
+            );
 
-        return new GroupAssignment(assignment);
+            return new GroupAssignment(assignment);
+        } catch (final MissingSourceTopicException e) {
+            return new GroupAssignment(
+                errorAssignment(clientMetadataMap, 
AssignorError.INCOMPLETE_SOURCE_TOPIC_METADATA.code())
+            );
+        } catch (final TaskAssignmentException e) {
+            return new GroupAssignment(
+                errorAssignment(clientMetadataMap, 
AssignorError.ASSIGNMENT_ERROR.code())

Review comment:
       Perhaps I did misunderstand the code after all.
   
   My read was that the old clients would actually _not_ get an exception if we 
return a new code. Instead, they would continue running in an undefined state 
and maybe just cryptically do nothing, or maybe throw an even more confusing 
exception, or maybe do something worse.
   
   That was my motivation for making sure they would at least throw an 
exception (the same exception they've always thrown for this condition, right?)




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