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 2019/10/11 18:41:19 UTC
[GitHub] [incubator-iceberg] rdblue opened a new pull request #538: Fix
connection leak in Hive table tests
rdblue opened a new pull request #538: Fix connection leak in Hive table tests
URL: https://github.com/apache/incubator-iceberg/pull/538
This is another attempt to fix the connection leak in the Hive table tests. The current theory is that the cache in `HiveCatalogs` is not behaving correctly. Because it uses weak keys, garbage collection will almost always remove the cached catalog between SQL queries, and the next query will result in a new connection to the metastore. The garbage collected catalog is not closed in this case.
This fixes the leak in two ways:
1. Use a fixed duration after the last access, 10 minutes, to expire catalogs
2. Because catalogs are expired instead of garbage collected, use a removal listener to close
3. Add a catch-all finalizer to HiveCatalog to ensure that catalogs are closed when leaked, and a stack trace is logged to help fix the leak
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org