You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/19 12:00:04 UTC

[GitHub] [iceberg] hililiwei commented on pull request #6614: Flink:fix flink streaming query problem [ Cannot get a client from a closed pool]

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

   > This issue/PR pointed out the problem of reusing the TableLoader object for internal table loading inside the FlinkSource or IcebergSource. One alternative fix is to add a clone() method to Flink TableLoader interface. Then the source internal usage of TableLoader can open and close the cloned TableLoader object, which avoids the close of the original TableLoader object.
   
   We can actually try to solve this problem from the inside of TableLoader, it makes sense to me to clone a table.
   
   But I also wonder if: If a catalog is closed, do tables loaded with its internal objects need to be kept available?
   * If the answer is yes, `jdbcCatalog` doesn't seem to guarantee it. It closes its `jdbc pool` when it closes, this is one of the causes of this issuse.
   Consider the following code:
   ```
   Table table = jdbcCatalog.loadTable(tableIdent);
   jdbcCatalog.close();
   ```
   The `table` can no longer be used because its `JdbcClientPool` is closed.
   * If the answer is no, I'm going to vote for clone table plan.
   
   Please correct me if I make a mistake. I need to continue thinking about this as well.


-- 
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-unsubscribe@iceberg.apache.org

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


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