jerryshao opened a new pull request, #10801: URL: https://github.com/apache/gravitino/pull/10801
### What changes were proposed in this pull request? Block H2 JDBC URLs and H2 driver class names in `DataSourceUtils.createDataSource()`, which is the entry point for all user-facing catalog JDBC connections. The check is intentionally scoped to `DataSourceUtils` and not added to the shared `JdbcUrlUtils.validateJdbcConfig()`, because that utility is also called by the internal entity store (`SqlSessionFactoryHelper`) which legitimately uses H2 as an embedded backend. ### Why are the changes needed? H2 is only used as an embedded backend for Gravitino's internal entity store and should not be used through user-facing catalog configuration. ### Does this PR introduce _any_ user-facing change? Catalog creation or `testConnection` calls that supply an H2 JDBC URL (e.g. `jdbc:h2:...`) or H2 driver class (e.g. `org.h2.Driver`) will now be rejected with a clear error message. The check is case-insensitive. ### How was this patch tested? Added 4 tests to `TestDataSourceUrlValidation`: - `testRejectH2Url` — blocks H2 URL - `testRejectH2UrlCaseInsensitive` — blocks `JDBC:H2:...` (uppercase) - `testRejectH2Driver` — blocks `org.h2.Driver` with a non-H2 URL - `testRejectH2DriverCaseInsensitive` — blocks `ORG.H2.DRIVER` -- 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]
