juiceyang opened a new pull request, #9191:
URL: https://github.com/apache/gravitino/pull/9191
### What changes were proposed in this pull request?
Allow repeated calls to GravitinoCatalogManager.create to support creating
multiple Flink SQL Gateway sessions.
### Why are the changes needed?
GravitinoCatalogManager.create throws error on repeated calls during Flink
SQL Gateway session creation.
```
Caused by: java.lang.IllegalStateException: Should not create duplicate
GravitinoCatalogManager
at
org.apache.gravitino.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:512)
at
org.apache.gravitino.flink.connector.catalog.GravitinoCatalogManager.create(GravitinoCatalogManager.java:59)
at
org.apache.gravitino.flink.connector.store.GravitinoCatalogStoreFactory.open(GravitinoCatalogStoreFactory.java:66)
at
org.apache.flink.table.gateway.service.context.SessionContext.buildCatalogManager(SessionContext.java:333)
at
org.apache.flink.table.gateway.service.context.SessionContext.initializeSessionState(SessionContext.java:294)
at
org.apache.flink.table.gateway.service.context.SessionContext.create(SessionContext.java:260)
at
org.apache.flink.table.gateway.service.session.SessionManagerImpl.openSession(SessionManagerImpl.java:154)
at
org.apache.flink.table.gateway.service.SqlGatewayServiceImpl.openSession(SqlGatewayServiceImpl.java:69)
... 49 more
```
Fix: #7340 [Bug report] Should not create duplicate GravitinoCatalogManager
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Local test passed: No errors encountered when opening sessions repeatedly.
Added an integration test case.
--
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]