This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8de3092  KAFKA-7930: topic is not internal if explicitly listed in 
args (#6267)
8de3092 is described below

commit 8de3092b0579a2319fb1191b4a66e573bc2b0781
Author: Murad <m...@muradm.net>
AuthorDate: Thu Feb 21 10:38:55 2019 +0300

    KAFKA-7930: topic is not internal if explicitly listed in args (#6267)
    
    Reviewers: John Roesler <j...@confluent.io>, Matthias J. Sax 
<matth...@confluent.io>
---
 core/src/main/scala/kafka/tools/StreamsResetter.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/src/main/scala/kafka/tools/StreamsResetter.java 
b/core/src/main/scala/kafka/tools/StreamsResetter.java
index ddb1406..3666f67 100644
--- a/core/src/main/scala/kafka/tools/StreamsResetter.java
+++ b/core/src/main/scala/kafka/tools/StreamsResetter.java
@@ -656,7 +656,12 @@ public class StreamsResetter {
 
 
     private boolean isInternalTopic(final String topicName) {
-        return topicName.startsWith(options.valueOf(applicationIdOption) + "-")
+        // Specified input/intermediate topics might be named like internal 
topics (by chance).
+        // 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"));
     }
 

Reply via email to