Open gabrywu opened 1 year ago
@Abacn can you help with this one?
JdbcDriver extends from calcite Driver, and both JdbcDriver and its base class calls register at static statement. Are they both contribute to metaspace leak? I do not find an obvious solution either here.
Are you able to deregister the stall Drivers using DriverManager.Deregister in a DoFn after Impulse() (so it will execute once) or its lacking permission (raising SQL SecurityException) ?
@Abacn yes, I remove this Driver by DriverManager.deregister in a tearDown, and it's OK to run DriverManager.deregister multiple times
What happened?
As of now ,
org.apache.beam.sdk.extensions.sql.impl.JdbcDriver
doesn't de-register itself fromjava.sql.DriverManager
. And this can causes metaspace leak, because it holds a ChildFirstClassLoader on a flink runner. If we submit jobs many times to a same flink cluster, corresponding cluster OOM eventually.Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components