This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new a233343fe3b branch-2.1: [fix](jvm)fix jvm metrics memory leak. #44311 
(#44399)
a233343fe3b is described below

commit a233343fe3b777726a1b3b2231dcc9f7fb7ff592
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Nov 23 03:30:28 2024 +0800

    branch-2.1: [fix](jvm)fix jvm metrics memory leak. #44311 (#44399)
    
    Cherry-picked from #44311
    
    Co-authored-by: daidai <changyu...@selectdb.com>
---
 be/src/util/jvm_metrics.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/util/jvm_metrics.cpp b/be/src/util/jvm_metrics.cpp
index 4cb71f5e827..b1089ef4136 100644
--- a/be/src/util/jvm_metrics.cpp
+++ b/be/src/util/jvm_metrics.cpp
@@ -485,8 +485,8 @@ Status JvmStats::refresh(JvmMetrics* jvm_metrics) const {
     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,
-                                        
GetObjectArrayElement((jobjectArray)threadInfos, i));
+        JNI_CALL_METHOD_CHECK_EXCEPTION_DELETE_REF(
+                jobject, threadInfo, env, 
GetObjectArrayElement((jobjectArray)threadInfos, i));
 
         if (threadInfo == nullptr) {
             continue;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to