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

panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new cc5d1efb68c [Chore](profile) adjust some profile (#58861)
cc5d1efb68c is described below

commit cc5d1efb68c38e3ec222cebe249a68af66b5de61
Author: Pxl <[email protected]>
AuthorDate: Thu Dec 11 14:23:45 2025 +0800

    [Chore](profile) adjust some profile (#58861)
    
    This pull request makes minor cleanup changes to memory usage tracking
    in the pipeline and data stream sender components. The main focus is on
    removing redundant or unnecessary memory counter updates.
    
    Memory tracking cleanup:
    
    * Removed a redundant call to `COUNTER_UPDATE(_memory_reserve_times, 1)`
    in `PipelineTask::execute`, simplifying memory reservation tracking.
    (This was deleted because it was counted twice)
    * Eliminated the deferred memory usage update logic in
    `Channel::add_rows`, streamlining memory counter management for channel
    operations. (Remove this because it will slightly affect performance)
---
 be/src/pipeline/pipeline_task.cpp       | 1 -
 be/src/vec/sink/vdata_stream_sender.cpp | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/be/src/pipeline/pipeline_task.cpp 
b/be/src/pipeline/pipeline_task.cpp
index 930e885fc3b..0b069d25c9a 100644
--- a/be/src/pipeline/pipeline_task.cpp
+++ b/be/src/pipeline/pipeline_task.cpp
@@ -540,7 +540,6 @@ Status PipelineTask::execute(bool* done) {
             SCOPED_TIMER(_sink_timer);
             Status status = Status::OK();
             DEFER_RELEASE_RESERVED();
-            COUNTER_UPDATE(_memory_reserve_times, 1);
             if (_state->get_query_ctx()
                         ->resource_ctx()
                         ->task_controller()
diff --git a/be/src/vec/sink/vdata_stream_sender.cpp 
b/be/src/vec/sink/vdata_stream_sender.cpp
index a05ce66ff98..6ff6bcb731c 100644
--- a/be/src/vec/sink/vdata_stream_sender.cpp
+++ b/be/src/vec/sink/vdata_stream_sender.cpp
@@ -138,10 +138,6 @@ Status Channel::add_rows(Block* block, const uint32_t* 
data, const uint32_t offs
     if (_pblock == nullptr) {
         _pblock = std::make_unique<PBlock>();
     }
-    int64_t old_channel_mem_usage = mem_usage();
-    Defer update_mem([&]() {
-        COUNTER_UPDATE(_parent->memory_used_counter(), mem_usage() - 
old_channel_mem_usage);
-    });
     RETURN_IF_ERROR(_serializer.next_serialized_block(block, _pblock.get(), 1, 
&serialized, eos,
                                                       data, offset, size));
     if (serialized) {


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

Reply via email to