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


##########
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:
   I removed the validation for `sync.group.offsets.enabled` and kept 
`emit.checkpoints.enabled` validation only



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