Repository navigation
fix(bigquery-jdbc): poll the JSON reference queue and release processed finalizers - #14719
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the JDBC driver's logging and garbage collection daemon to prevent memory and resource leaks. Specifically, it changes several 'BigQueryJdbcCustomLogger' instances to static fields to avoid registering excessive child loggers, and refactors 'BigQueryDaemonPollingTask' to use instance-specific reference queues and finalizer lists. Feedback on the changes highlights a potential issue where an unchecked exception thrown during resource finalization could silently terminate the daemon thread, leading to permanent resource leaks; wrapping the loop's body in a 'try-catch-finally' block is recommended to ensure the thread remains alive and references are always cleared.
|
Note that this PR is not targeting main branch |
b/524270586