[ https://issues.apache.org/jira/browse/FLINK-20614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-20614: ----------------------------------- Labels: auto-deprioritized-critical auto-deprioritized-major stale-minor (was: auto-deprioritized-critical auto-deprioritized-major) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized. > Registered sql drivers not deregistered after task finished in session cluster > ------------------------------------------------------------------------------ > > Key: FLINK-20614 > URL: https://issues.apache.org/jira/browse/FLINK-20614 > Project: Flink > Issue Type: Bug > Components: Connectors / JDBC, Runtime / Task > Affects Versions: 1.12.0, 1.13.0 > Reporter: Kezhu Wang > Priority: Minor > Labels: auto-deprioritized-critical, auto-deprioritized-major, > stale-minor > > {{DriverManager}} keeps registered drivers in its internal data structures > which prevents they from gc after task finished. I confirm it in standalone > session cluster by observing that {{ChildFirstClassLoader}} could not be > reclaimed after several {{GC.run}}, it should exist in all session clusters. > Tomcat documents > [this|https://ci.apache.org/projects/tomcat/tomcat85/docs/jndi-datasource-examples-howto.html#DriverManager,_the_service_provider_mechanism_and_memory_leaks] > and fixes/circumvents this with > [JdbcLeakPrevention|https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/loader/JdbcLeakPrevention.java#L30]. > Should we solve this in runtime ? Or treat it as connector and clients' > responsibility to solve it using > {{RuntimeContext.registerUserCodeClassLoaderReleaseHookIfAbsent}} or similar ? > Personally, it would be nice to solve in runtime as a catch-all to avoid > memory-leaking and provide consistent behavior to clients cross per-job and > session mode. -- This message was sent by Atlassian Jira (v8.20.1#820001)