github-actions[bot] commented on code in PR #62464:
URL: https://github.com/apache/doris/pull/62464#discussion_r3077042109
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/JdbcExternalCatalog.java:
##########
@@ -422,12 +413,19 @@ private void testBeToJdbcConnection(JdbcClient
testClient) throws DdlException {
if (code != TStatusCode.OK) {
throw new DdlException("Test BE Connection to JDBC Failed: " +
result.getStatus().getErrorMsgs(0));
}
- } catch (TException | RpcException | ExecutionException |
InterruptedException e) {
+ } catch (RpcException | ExecutionException | InterruptedException e) {
throw new RuntimeException(e);
}
}
- private TTableDescriptor buildTestConnectionThrift() throws DdlException {
+ public PJdbcTestConnectionRequest
buildTestConnectionRequest(TOdbcTableType tableType) {
Review Comment:
Blocking: this switches the BE connectivity test to resolve the catalog back
out of `CatalogMgr`, but `checkWhenCreating()` runs before the new catalog is
registered there. The create flow is
`CatalogFactory.createCatalog(...)->catalog.checkWhenCreating()` first, and
only later `CatalogMgr.createCatalogImpl(...)->createCatalogInternal(...)` adds
the catalog. In that window `FrontendServiceImpl.getJdbcTestConnectionInfo()`
will see `getCatalog(request.getCatalogId()) == null`, so `CREATE CATALOG ...
PROPERTIES('type'='jdbc', ...)` now fails whenever `test_connection=true` and a
BE is available. Please keep using the already-validated in-memory catalog
properties during creation, or add a separate trusted path that does not depend
on the catalog already existing in `CatalogMgr`.
--
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]