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



##########
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:
       Currently `MirrorSourceConnector.isCycle` is only called from 
`MirrorSourceConnector.shouldReplicateTopic`, which is the method that needs to 
make decision based on `ReplicationPolicy` used. However I'm out of ideas how 
to detect without adding some methods into `ReplicationPolicy` interface, and 
modifying the interface feels like somewhat bigger effort.




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