morningman commented on code in PR #30588: URL: https://github.com/apache/doris/pull/30588#discussion_r1471198456
########## fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/JdbcExternalCatalog.java: ########## @@ -236,10 +235,34 @@ public void setDefaultPropsWhenCreating(boolean isReplay) throws DdlException { + "only_specified_database is false"); } } + int connectionPoolMinSize = getConnectionPoolMinSize(); + int connectionPoolMaxSize = getConnectionPoolMaxSize(); + int connectionPoolMaxWaitTime = getConnectionPoolMaxWaitTime(); + int connectionPoolMaxLifeTime = getConnectionPoolMaxLifeTime(); + if (connectionPoolMinSize < 0) { + throw new DdlException("connection_pool_min_size must be greater than or equal to 0"); + } + if (connectionPoolMaxSize < 1) { + throw new DdlException("connection_pool_max_size must be greater than or equal to 1"); + } + if (connectionPoolMaxSize < connectionPoolMinSize) { + throw new DdlException( + "connection_pool_max_size must be greater than or equal to connection_pool_min_size"); + } + if (connectionPoolMaxWaitTime < 0) { + throw new DdlException("connection_pool_max_wait_time must be greater than or equal to 0"); + } + if (connectionPoolMaxWaitTime > 30000) { + throw new DdlException("connection_pool_max_wait_time must be less than or equal to 30000"); + } + if (connectionPoolMaxLifeTime < 150000) { Review Comment: We need to define this value somewhere, there are too many magic number in code -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org