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

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


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 4cf7e590916 branch-3.1: [fix](bvar) Fix bvar leak after schema change 
job in be failed #56207 (#56269)
4cf7e590916 is described below

commit 4cf7e590916237116b3c888dc9d45af73160d766
Author: xy720 <[email protected]>
AuthorDate: Mon Sep 29 14:32:16 2025 +0800

    branch-3.1: [fix](bvar) Fix bvar leak after schema change job in be failed 
#56207 (#56269)
    
    picked from #56207
---
 be/src/agent/task_worker_pool.cpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/be/src/agent/task_worker_pool.cpp 
b/be/src/agent/task_worker_pool.cpp
index ab9b56d2798..64c56072f95 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -497,11 +497,14 @@ void add_task_count(const TAgentTaskRequest& task, int n) 
{
     {
         ALTER_count << n;
         // cloud auto stop need sc jobs, a tablet's sc can also be considered 
a fragment
-        doris::g_fragment_executing_count << 1;
-        int64 now = duration_cast<std::chrono::milliseconds>(
-                            
std::chrono::system_clock::now().time_since_epoch())
-                            .count();
-        g_fragment_last_active_time.set_value(now);
+        if (n > 0) {
+            // only count fragment when task is actually starting
+            doris::g_fragment_executing_count << 1;
+            int64_t now = duration_cast<std::chrono::milliseconds>(
+                                
std::chrono::system_clock::now().time_since_epoch())
+                                .count();
+            g_fragment_last_active_time.set_value(now);
+        }
         return;
     }
     default:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to