tinaselenge commented on code in PR #13373:
URL: https://github.com/apache/kafka/pull/13373#discussion_r1144967498


##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConnector.java:
##########
@@ -540,10 +601,13 @@ Map<String, Config> describeTopicConfigs(Set<String> 
topics)
 
     Config targetConfig(Config sourceConfig) {
         List<ConfigEntry> entries = sourceConfig.entries().stream()
-            .filter(x -> !x.isDefault() && !x.isReadOnly() && !x.isSensitive())
-            .filter(x -> x.source() != 
ConfigEntry.ConfigSource.STATIC_BROKER_CONFIG)
-            .filter(x -> shouldReplicateTopicConfigurationProperty(x.name()))
-            .collect(Collectors.toList());
+                    .filter(x -> 
(!useIncrementalAlterConfigs.equals(MirrorSourceConfig.NEVER_USE_INCREMENTAL_ALTER_CONFIG)
+                            || (x.isDefault() && 
shouldReplicateSourceDefault(x.name())))
+                            || (!x.isDefault() && 
useIncrementalAlterConfigs.equals(MirrorSourceConfig.NEVER_USE_INCREMENTAL_ALTER_CONFIG)))
+                    .filter(x -> !x.isReadOnly() && !x.isSensitive())
+                    .filter(x -> x.source() != 
ConfigEntry.ConfigSource.STATIC_BROKER_CONFIG)
+                    .filter(x -> 
shouldReplicateTopicConfigurationProperty(x.name()))

Review Comment:
   I'm not quite if I understand this comment. Would you mind elaborating on 
why you think shouldReplicateTopicConfigurationProperty is double checking the 
default values? My understanding from the KIP was that this function should 
determine whether to replicate the config regardless of what values(default or 
not) it has. 



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