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 2022/07/18 16:17:06 UTC
[GitHub] [kafka] FreerXY opened a new pull request, #12419: fix KAFKA-14082
FreerXY opened a new pull request, #12419:
URL: https://github.com/apache/kafka/pull/12419
*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*
*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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
[GitHub] [kafka] FreerXY commented on pull request #12419: fix KAFKA-14082
Posted by GitBox <gi...@apache.org>.
FreerXY commented on PR #12419:
URL: https://github.com/apache/kafka/pull/12419#issuecomment-1187700242
Fix Mirror Maker 2.0 sync topic configs need more validly ,linking: https://issues.apache.org/jira/browse/KAFKA-14082
--
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
[GitHub] [kafka] FreerXY closed pull request #12419: fix KAFKA-14082
Posted by GitBox <gi...@apache.org>.
FreerXY closed pull request #12419: fix KAFKA-14082
URL: https://github.com/apache/kafka/pull/12419
--
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
[GitHub] [kafka] FreerXY commented on a diff in pull request #12419: fix KAFKA-14082
Posted by GitBox <gi...@apache.org>.
FreerXY commented on code in PR #12419:
URL: https://github.com/apache/kafka/pull/12419#discussion_r923577568
##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConnector.java:
##########
@@ -297,10 +291,18 @@ private void syncTopicAcls()
private void syncTopicConfigs()
throws InterruptedException, ExecutionException {
- Map<String, Config> sourceConfigs = describeTopicConfigs(topicsBeingReplicated());
- Map<String, Config> targetConfigs = sourceConfigs.entrySet().stream()
- .collect(Collectors.toMap(x -> formatRemoteTopic(x.getKey()), x -> targetConfig(x.getValue())));
- updateTopicConfigs(targetConfigs);
+ Set<String> topics=this.topicsBeingReplicated();
+ Map<String, Config> configDiff=new HashMap<>();
+ Map<String, Config> sourceConfigs = describeTopicConfigs(topics,sourceAdminClient).entrySet().stream()
+ .collect(Collectors.toMap(x -> formatRemoteTopic(x.getKey()), x -> targetConfig(x.getValue())));
+ Map<String, Config> targetConfigs = describeTopicConfigs(topics,targetAdminClient).entrySet().stream()
+ .collect(Collectors.toMap(x -> formatRemoteTopic(x.getKey()), x -> targetConfig(x.getValue())));
+ for (String topic:sourceConfigs.keySet()){
+ if(targetConfigs.containsKey(topic)&&!targetConfigs.get(topic).equals(sourceConfigs.get(topic))){
+ configDiff.put(topic,sourceConfigs.get(topic));
+ }
+ }
+ updateTopicConfigs(configDiff);
Review Comment:
//this way is better
if (!configDiff.isEmpty()){
updateTopicConfigs(configDiff);
}
--
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