tvainika commented on pull request #10277: URL: https://github.com/apache/kafka/pull/10277#issuecomment-792942212
> Seems harmless, but can you share the motivation behind this change? Did you come across some scenario where the existing logic didn't work? Yes, those are documented in the issue [KAFKA-9914](https://issues.apache.org/jira/browse/KAFKA-9914) The old code assumes each source or target Kafka cluster is referred with same name over all MM2 instances. If different names are used pointing to same Kafka cluster, 1. With one MM2 instance where both `kafka` and `backup` are actually same one Kafka cluster, e.g. mm2.properties like ``` clusters=kafka,backup kafka.bootstrap.servers=XXX:9092 backup.bootstrap.servers=XXX:9092 kafka->backup.enabled=true ``` will start create topic `kafka.X` for each topic `X` in the cluster, eventually leading to topic such as `kafka.kafka.kafka.kafka.X` etc. Even if one argues this is a misconfiguration, it still allows one to shoot themselves into the foot with infinite recursion. 2. With two MM2 instances in two different data centers having mm2.properties configured using different named aliases to Kafka clusters mm2.properties in DC A ``` cluster_A_A=XXX:9092 cluster_A_B=YYY:9092 cluster_A_A->cluster_A_B.enabled=true ``` In DC B: ``` cluster_B_A=XXX:9092 cluster_B_B=YYY:9092 cluster_B_B->cluster_B_A.enabled=true ``` for topic `X` in Kafka cluster XXX, the replication flow will create `cluster_A_A.X` in Kafka cluster YYY, and second replication will create topic `cluster_B_B.cluster_A_A.X`, and then the replication flow of DC A's MM will create `cluster_A_A.cluster_B_B.cluster_A_A.X` etc. ---------------------------------------------------------------- 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: us...@infra.apache.org