Jackeyzhe commented on issue #7340:
URL: https://github.com/apache/gravitino/issues/7340#issuecomment-2956399581

   > > > The main problem is `GravitinoCatalogManager` is created multiple 
times in Flink SQL gateway. Is it expected?
   > > 
   > > 
   > > Flink SQL can create multi sessions, and we can't assume that user only 
use the same catalog in different sessions, so I think it is expected to create 
multi `GravitinoCatalogManager `. what do you think about? 
[@FANNG1](https://github.com/FANNG1) [@coolderli](https://github.com/coolderli)
   > 
   > Could you share more context and code path on why Flink SQL will create 
multiple `GravitinoCatalogManager`?
   
   Sure, according to this 
[article](https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway),
 the session in Flink SQL Gateway was designed for acting as an isolation of 
resources including metadata. And it support `USE CATALOG` commend to change 
different catalog. 
   In addition, each session has its own `SessionState`, and the catalog 
infomation was saved in the 
[SessionState](https://github.com/apache/flink/blob/master/flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/context/SessionContext.java)


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