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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java:
##########
@@ -523,7 +523,17 @@ private RepartitionTopics prepareRepartitionTopics(final 
Cluster metadata) {
         final boolean isMissingInputTopics = 
!repartitionTopics.missingSourceTopicExceptions().isEmpty();
         if (isMissingInputTopics) {
             if (!taskManager.topologyMetadata().hasNamedTopologies()) {
-                throw new MissingSourceTopicException("Missing source 
topics.");

Review Comment:
   Seems there is some misunderstanding. Sorry for causing confusion.
   
   1) This current code is not producing a log message:
   ```
   final String errorMsg = String.format("Missing source topics. %s", 
repartitionTopics.missingSourceTopics());
   throw new MissingSourceTopicException(errorMsg);
   ```
   The code should be something like:
   ```
   final String errorMsg = String.format("Missing source topics. %s", 
repartitionTopics.missingSourceTopics());
   log.error(errorMsg);
   throw new MissingSourceTopicException(errorMsg);
   ```
   
   2) I did not propose to include the topic names... As Bruno already pointed 
out, it would require a protocol change what seems to be overkill. In 
`StreamsRebalanceListener`, we currently log 
   ```
   Received error code 1
   ```
   Cf 
https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsRebalanceListener.java#L56
   
   I would propose to actually change `AssignorError` to contain a proper 
String. Error code `1` does not mean anything to users. Additionally, it might 
be good to just change the error message of the log line and the exception to 
say something like: "To check which topics are missing, please look into the 
logs of the consumer group leader. Only the leaders knows and logs the name of 
the missing topics."



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to