stevenzwu commented on PR #6614:
URL: https://github.com/apache/iceberg/pull/6614#issuecomment-1402267342

   > I think that if a catalog is closed, it's reasonable for tables to stop 
operating as well. The catalog manages its shared resources and if it chooses 
to share a connection pool with tables then it makes sense for the tables to no 
longer be able to connect after the pool is closed.
   
   > Tables should not own their own connection pools, so some resource needs 
to manage them and the catalog is a good place to do that.
   
   @rdblue I agree that in this case tables weren't able to connect/refresh 
after the pool is closed by the catalog. But I feel it should be ok to use the 
table as read-only (like a `SerializableTable`). what do you think?
   
   > I think the problem is that the TableLoader is taking ownership of the 
catalog and closing it. That seems incorrect to me.
   
   It is not necessarily wrong for `TableLoader` to take the ownership of the 
catalog. because `CatalogTableLoader` loads the catalog in its `open` method, 
it is fine for `CatalogTableLoader` to close the catalog in its `close` method.
   
   I am not saying it is in the most efficient way, as it implies each 
`TableLoader` object is going to load its own `Catalog`. there is no way to 
share `Catalog`. This is probably not an issue for most Flink jobs which don't 
load too many tables in one job.
   
   


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to