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

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


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

commit b4a5503a99f1e8939c343efdaaddc57f2cceee5f
Author: xy720 <[email protected]>
AuthorDate: Fri Oct 17 11:48:00 2025 +0800

    branch-3.0: [fix](bvar) Fix bvar leak after schema change job in be failed 
(#56270)
    
    pick: #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 dba0dd33df6..8d18e021b7a 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -492,11 +492,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