Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[branch-2.0][fix](jdbc catalog) Fix Memory Leak by Enabling Weak Refe…
…rences in HikariCP (#39835) pick (#39582) This PR addresses a memory leak issue caused by FastList objects in HikariCP being retained by ThreadLocal variables, which are not easily garbage collected in long-running JNI threads. To mitigate this, a system property com.zaxxer.hikari.useWeakReferences is set to true, ensuring that WeakReference is used for ThreadLocal objects, allowing the garbage collector to reclaim memory more effectively. Even though setting this will affect some performance, solving resource leaks is relatively more important Performance difference before and after setting Before setting: 10 concurrency 0.02-0.05 100 concurrency 0.18-0.4 After setting: 10 concurrency 0.02-0.07 100 concurrency 0.18-0.7
- Loading branch information