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 2021/08/12 14:01:38 UTC

[GitHub] [kafka] ryannedolan commented on a change in pull request #10277: KAFKA-9914: Fix replication cycle detection

ryannedolan commented on a change in pull request #10277:
URL: https://github.com/apache/kafka/pull/10277#discussion_r687741760



##########
File path: connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConnector.java
##########
@@ -489,7 +489,17 @@ boolean isCycle(String topic) {
         String source = replicationPolicy.topicSource(topic);
         if (source == null) {
             return false;
-        } else if (source.equals(sourceAndTarget.target())) {
+        }
+
+        // Fix for https://issues.apache.org/jira/browse/KAFKA-9914
+        final boolean condition;
+        if (replicationPolicy instanceof IdentityReplicationPolicy) {

Review comment:
       Moving isCycle to ReplicationPolicy might make sense. Wondering what the use-case would be for a custom isCycle tho?




-- 
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-unsubscribe@kafka.apache.org

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