-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
branch-2.1
What's Wrong?
fe memory leak
What You Expected?
do not leak
How to Reproduce?
One Reproduce Steps:
1、create a jdbc catalog:
CREATE CATALOG `test_catalog` PROPERTIES (
"user" = "test_user",
"type" = "jdbc",
"password" = "xxxx",
"metadata_refresh_interval_sec" = "10",
"jdbc_url" = "jdbc:mysql://127.0.0.1:3600/cambyzhu?yearIsDateType=false&tinyInt1isBit=false&transformedBitIsBoolean=true&useUnicode=true&characterEncoding=utf-8",
"driver_url" = "mysql-connector-j-8.0.33.jar",
"driver_class" = "com.mysql.cj.jdbc.Driver",
"checksum" = "801b67e18f23e4e9ec392812a1c108d4"
);
2、then drop user test_user
3、Trigger the memory leak:
for i in {1..10000};do mysql -h127.0.0.1 -uroot -P9030 -e "switch test_catalog;show databases";echo $i;done
We will got error message like:
ERROR 1105 (HY000) at line 1: Failed to initialize JdbcMySQLClient: Catalog test_catalog can not connect to jdbc due to error: Access denied for user 'default_cluster:test_user@127.0.0.1' (using password: YES)
Then we found:
1、jvm_non_heap leak
2、java.net.FactoryURLClassLoader leak in jvm heap

Another Reproduce Steps:
1、create a jdbc catalog with metadata_refresh_interval_sec = 1
2、Trigger the memory leak:
for i in {1..10000};do mysql -h127.0.0.1 -uroot -P9030 -e "show databases from test_catalog;";echo $i;sleep 1;done
Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels