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

zouxinyi 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 d40a9d0555 [fix](memtracker) Fix memtracker did not subtract the 
memory released by load channel cancel (#12405)
d40a9d0555 is described below

commit d40a9d05559c6f443ccd1403d27a5a2a11bbe635
Author: Luwei <814383...@qq.com>
AuthorDate: Thu Sep 8 09:22:11 2022 +0800

    [fix](memtracker) Fix memtracker did not subtract the memory released by 
load channel cancel (#12405)
    
    When the load channel is canceled, the memtracker does not subtract the 
memory released by the load channel. This will cause the memory usage counted 
by the memtracker of the load channel mgr to be larger than the actual memory 
usage.
---
 be/src/olap/delta_writer.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp
index 0f2e776919..7ea8a00966 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -380,6 +380,7 @@ Status DeltaWriter::cancel() {
     if (!_is_init || _is_cancelled) {
         return Status::OK();
     }
+    SCOPED_ATTACH_TASK(_mem_tracker, ThreadContext::TaskType::LOAD);
     _mem_table.reset();
     if (_flush_token != nullptr) {
         // cancel and wait all memtables in flush queue to be finished


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

Reply via email to