-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](jvm)fix jvm metrics memory leak.(#44311) #44218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](jvm)fix jvm metrics memory leak.(#44311) #44218
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
| jvm_metrics->jvm_thread_count->set_value(threadCount < 0 ? 0 : threadCount); | ||
|
|
||
| for (int i = 0; i < threadCount; i++) { | ||
| JNI_CALL_METHOD_CHECK_EXCEPTION(jobject, threadInfo, env, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not fix branch master at first, then auto pick to 3.0 and 2.1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for version 3.0.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only 3.0 have this problem? It seems line 488 is the same in branch master & 2.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will pick to all branches.
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
### What problem does this PR solve? fix jvm metrics memory leak.before pr apache#42507 when you set `enable_jvm_monitor=true` in be.conf, you can find that be jvm memory is slowly growing. By analyzing the hprof file, we can find that there are a large number of `java.lang.management.ThreadInfo` objects. The specific cause of the memory leak is: jni does not manually delete the local reference after getting the object from the array, resulting in the object not being GC.
What problem does this PR solve?
fix jvm metrics memory leak.before pr #42507
when you set
enable_jvm_monitor=truein be.conf, you can find that be jvm memory is slowly growing.By analyzing the hprof file, we can find that there are a large number of
java.lang.management.ThreadInfoobjects.The specific cause of the memory leak is: jni does not manually delete the local reference after getting the object from the array, resulting in the object not being GC.
Issue Number: close #xxx
Related PR: #44311
Problem Summary:
Release note
None
Check List (For Author)
Test
just fix memory leak no logic has been changed
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)