tvainika commented on a change in pull request #10277: URL: https://github.com/apache/kafka/pull/10277#discussion_r687419372
########## 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: So clearly the `IdentityReplicationPolicy` cannot detect cycles, and this is documented https://github.com/apache/kafka/blob/2edaf9ddd30a6417c34f5bce6894a5340632ff1e/docs/upgrade.html#L112 So, would it make sense to move this `isCycle()` method to `ReplicationPolicy` interface (changing that interface, which is marked `evolving`), and have separate implementation for `isCycle` per replication policy, or which kind of approach do you see fitting best here? -- 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