jarredhj0214 opened a new pull request, #11717:
URL: https://github.com/apache/gravitino/pull/11717

   ### What changes were proposed in this pull request?
   
   This PR introduces `OceanBaseCatalogOperations` for the OceanBase JDBC 
catalog and makes `OceanBaseCatalog` use it instead of 
`MySQLProtocolCompatibleCatalogOperations`.
   
   The new operations class extends the generic `JdbcCatalogOperations`, so 
OceanBase catalog initialization no longer applies the MySQL Connector/J 
major-version check. It still shuts down MySQL Connector/J cleanup resources 
when present, which keeps the MySQL protocol driver path covered.
   
   A unit test is added to verify that OceanBase catalog uses 
`OceanBaseCatalogOperations` and does not use 
`MySQLProtocolCompatibleCatalogOperations`.
   
   ### Why are the changes needed?
   
   OceanBase catalog supports both MySQL protocol URLs and OceanBase protocol 
URLs. Users may configure either MySQL Connector/J or the OceanBase official 
JDBC driver.
   
   Currently, OceanBase catalog reuses 
`MySQLProtocolCompatibleCatalogOperations`, which rejects drivers whose major 
version is lower than 8. This can incorrectly reject OceanBase JDBC drivers, 
for example `oceanbase-client-2.4.18.jar`, during catalog creation with an 
error like:
   
   `Mysql catalog does not support the jdbc driver version 2.4.18, minimal 
required version is 8.0`
   
   This issue is not specific to `2.4.18`; OceanBase JDBC driver 4.x can also 
be incorrectly rejected because its major version is still lower than 8.
   
   Fix: N/A
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Creating an OceanBase catalog with the OceanBase JDBC driver is no 
longer incorrectly blocked by the MySQL Connector/J version check.
   
   No public API or catalog property is added or removed.
   
   ### How was this patch tested?
   
   Added unit coverage in `TestOceanBaseCatalogOperations`.
   
   `git diff --check` passed.
   
   Gradle tests were not run locally because the current machine only has JDK 8 
installed, while Gravitino requires JDK 17 to build.


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

Reply via email to