OmniaGM commented on code in PR #15999:
URL: https://github.com/apache/kafka/pull/15999#discussion_r1668753278


##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConfig.java:
##########
@@ -166,6 +167,30 @@ Duration consumerPollTimeout() {
         return Duration.ofMillis(getLong(CONSUMER_POLL_TIMEOUT_MILLIS));
     }
 
+    public static Map<String, String> validate(Map<String, String> configs) {
+        Map<String, String> invalidConfigs = new HashMap<>();
+
+        // No point to validate when connector is disabled.
+        if ("false".equals(configs.getOrDefault(ENABLED, "true"))) {
+            return invalidConfigs;
+        }
+
+        boolean emitCheckpointDisabled = 
"false".equals(configs.getOrDefault(EMIT_CHECKPOINTS_ENABLED, "true"));
+        boolean syncGroupOffsetsDisabled = 
"false".equals(configs.getOrDefault(SYNC_GROUP_OFFSETS_ENABLED, "true"));
+
+        if (emitCheckpointDisabled && syncGroupOffsetsDisabled) {
+            Arrays.asList(SYNC_GROUP_OFFSETS_ENABLED, 
EMIT_CHECKPOINTS_ENABLED).forEach(configName -> {
+                invalidConfigs.putIfAbsent(configName, 
"MirrorCheckpointConnector can't run with both " + SYNC_GROUP_OFFSETS_ENABLED + 
" and " +

Review Comment:
   My understanding that it will not start a task so the connector would be 
doing nothing without any feedback or indication for why. If this is 
problematic I would suggest remove this check as this was a suggestion out of 
the scope of the KIP to begin with. @C0urante and @chia7712 WDYT?



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