You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/16 16:54:00 UTC

[GitHub] [kafka] guozhangwang commented on a change in pull request #8671: KAFKA-9859 / Add topics generated by KTable FK join to internal topic matching logic

guozhangwang commented on a change in pull request #8671:
URL: https://github.com/apache/kafka/pull/8671#discussion_r426170554



##########
File path: core/src/main/scala/kafka/tools/StreamsResetter.java
##########
@@ -673,11 +673,17 @@ private boolean isInternalTopic(final String topicName) {
         // Even is this is not expected in general, we need to exclude those topics here
         // and don't consider them as internal topics even if they follow the same naming schema.
         // Cf. https://issues.apache.org/jira/browse/KAFKA-7930
-        return !isInputTopic(topicName) && !isIntermediateTopic(topicName)
-            && topicName.startsWith(options.valueOf(applicationIdOption) + "-")
-            && (topicName.endsWith("-changelog") || topicName.endsWith("-repartition")
-                || topicName.endsWith("-subscription-registration-topic")
-                || topicName.endsWith("-subscription-response-topic"));
+        return !isInputTopic(topicName) && !isIntermediateTopic(topicName) && topicName.startsWith(options.valueOf(applicationIdOption) + "-")
+               && matchesInternalTopicFormat(topicName);
+    }
+
+    // visible for testing
+    public boolean matchesInternalTopicFormat(final String topicName) {
+        return topicName.endsWith("-changelog") || topicName.endsWith("-repartition")
+               || topicName.endsWith("-subscription-registration-topic")

Review comment:
       Not a suggestion comment: now looking at this I think maybe we should not add the `-topic` suffix for those topics since we did not for repartition and changelog :)




----------------------------------------------------------------
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:
users@infra.apache.org