github-actions[bot] commented on code in PR #62700:
URL: https://github.com/apache/doris/pull/62700#discussion_r3128004718


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/DataSourceConfigValidator.java:
##########
@@ -83,6 +89,16 @@ public static void validateSource(Map<String, String> input) 
throws IllegalArgum
                 throw new IllegalArgumentException("Invalid value for key '" + 
key + "': " + value);
             }
         }
+
+        // Cross-field: verify-ca must be paired with a CA cert; otherwise the 
reader will
+        // silently fall back to the JVM default truststore and likely fail to 
connect.
+        if 
(DataSourceConfigKeys.SSL_MODE_VERIFY_CA.equals(input.get(DataSourceConfigKeys.SSL_MODE))

Review Comment:
   This cross-field check is correct for a fully materialized config, but 
`AlterJobCommand` calls `validateSource()` on the *delta* map from `ALTER JOB`, 
not on the merged source properties. That means `ALTER JOB ... SET 
("ssl_mode"="verify-ca")` is rejected unless the caller redundantly resends 
`ssl_rootcert`, even when the existing job already has one. Can we move this 
validation to the merged property set (or pass the original properties in) so 
valid alters don't fail?



##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/DataSourceConfigValidator.java:
##########
@@ -114,6 +130,9 @@ private static boolean isValidValue(String key, String 
value) {
                 || value.equals(DataSourceConfigKeys.OFFSET_SNAPSHOT))) {
             return false;
         }
+        if (key.equals(DataSourceConfigKeys.SSL_MODE) && 
!ALLOW_SSL_MODES.contains(value)) {

Review Comment:
   `validateSource()` is shared by both MySQL and PostgreSQL create/alter 
flows, but this new allowlist only keeps the three MySQL values. PostgreSQL 
still accepts `allow`, `prefer`, and `verify-full` 
(`PostgresConnectorConfig.SecureConnectionMode` / pgjdbc `SslMode`), so this 
now makes previously valid PG streaming jobs fail fast in FE validation. Can we 
make the allowed set depend on the source type, or otherwise keep the broader 
PG set here and only normalize/restrict on the MySQL reader path?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to