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

zouxinyi pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
     new a33ce077bf [fix](memtracker) Fix memtracker did not subtract the 
memory released by load channel cancel (#12405)
a33ce077bf is described below

commit a33ce077bf4a0d375c57226fed6835c429e894ad
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 b33b5b215b..ed59ea1bbd 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -325,6 +325,7 @@ OLAPStatus DeltaWriter::cancel() {
     if (!_is_init || _is_cancelled) {
         return OLAP_SUCCESS;
     }
+    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