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


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/PostgresResourceValidator.java:
##########
@@ -44,6 +46,8 @@ public class PostgresResourceValidator {
 
     public static void validate(Map<String, String> sourceProperties, String 
jobId, List<String> tableNames)
             throws JobException {

Review Comment:
   This check is correct locally, but it is still too late in the real CREATE 
JOB path. `StreamingInsertJob.initSourceJob()` calls `createTableIfNotExists()` 
before `StreamingJobUtils.resolveAndValidateSource()`, and 
`createTableIfNotExists()` calls `StreamingJobUtils.generateCreateTableCmds()`, 
which opens the JDBC client and introspects the remote database before this 
validator runs. If the configured PG database name is 64+ bytes but truncates 
to an existing database, CREATE JOB can still connect to that truncated DB and 
even create Doris target tables before failing here. That leaves side effects 
after a rejected job and does not satisfy the advertised fail-fast behavior. 
Please run the database-name length check before `createTableIfNotExists()` (or 
split out a cheap pre-validation step before any JDBC/schema work) and cover 
the CREATE JOB path, not only the direct validator call.



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