[branch-2.1][improvement](mysql catalog) disable mysql AbandonedConnectionCleanupThread (#36970)

pick (#36655)
This commit is contained in:
zy-kkk
2024-06-29 18:35:41 +08:00
committed by GitHub
parent a9855ca173
commit e25b0d7c37
2 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,7 @@ public class MySQLJdbcExecutor extends BaseJdbcExecutor {
public MySQLJdbcExecutor(byte[] thriftParams) throws Exception {
super(thriftParams);
System.setProperty("com.mysql.cj.disableAbandonedConnectionCleanup", "true");
}
@Override

View File

@ -45,6 +45,8 @@ public class JdbcMySQLClient extends JdbcClient {
protected JdbcMySQLClient(JdbcClientConfig jdbcClientConfig) {
super(jdbcClientConfig);
// Disable abandoned connection cleanup
System.setProperty("com.mysql.cj.disableAbandonedConnectionCleanup", "true");
convertDateToNull = isConvertDatetimeToNull(jdbcClientConfig);
Connection conn = null;
Statement stmt = null;