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

   ### What changes were proposed in this pull request?
   
   Convert the version gate in `GravitinoConnectorFactory.checkTrinoSpiVersion` 
from a hard `TrinoException` to a `LOG.warn`, restoring the behavior added in 
#7256 and inadvertently undone by the split refactor in #9735.
   
   ### Why are the changes needed?
   
   Fix: #10717
   
   Before #9735, `CatalogRegister.checkSupportCatalogNameWithMetalake` logged a 
warning when a user combined `gravitino.use-single-metalake=false` with a Trino 
version whose connector adapter reports `supportCatalogNameWithMetalake()` as 
`false`. After #9735 the check moved to `GravitinoConnectorFactory` and became 
a hard throw, making it impossible to start the connector at all on Trino 
452+/469+/473+ when running in multi-metalake mode -- even though the 
underlying `CatalogConnectorManager` paths still work and are covered by 
`TestCatalogConnectorManager`.
   
   The reporter in #10717 hits this verbatim: starting Trino 478 with 
`gravitino.use-single-metalake=false` produces `TrinoException: The 
trino-connector-473-478 does not support catalog name with metalake.` and the 
catalog fails to load.
   
   This PR restores the warning-only behavior intentionally established by 
#7255 / #7256, so existing deployments that opt into multi-metalake mode can 
continue to use it after upgrading to a release that includes #9735.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes: users on Trino 452+ with `gravitino.use-single-metalake=false` no 
longer see the `GRAVITINO_UNSUPPORTED_TRINO_VERSION` exception at startup. They 
now see a warning instead, matching the pre-#9735 behavior.
   
   ### How was this patch tested?
   
   - New unit test `TestGravitinoConnectorFactory` with three cases:
     - regression: multi-metalake mode against an adapter that reports 
`supportCatalogNameWithMetalake() == false` no longer throws
     - sanity: SPI version still outside the supported window still throws 
`GRAVITINO_UNSUPPORTED_TRINO_VERSION`
     - sanity: single-metalake mode happy path is unaffected
   - Existing `TestCatalogConnectorManager` multi-metalake tests still pass.
   - `./gradlew :trino-connector:trino-connector:test -PskipITs` -- BUILD 
SUCCESSFUL, 0 failures.
   - `./gradlew :trino-connector:trino-connector:spotlessApply` -- clean.


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