This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new db259485d96 [fix](memory) Fix compaction destructor memory tracking
#33549 (#33572)
db259485d96 is described below
commit db259485d96a36d56b5cfe9e662fc82d2679f137
Author: Xinyi Zou <[email protected]>
AuthorDate: Fri Apr 12 17:04:04 2024 +0800
[fix](memory) Fix compaction destructor memory tracking #33549 (#33572)
---
be/src/olap/compaction.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index 19b4d03c346..8928d471609 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -61,6 +61,7 @@
#include "olap/txn_manager.h"
#include "olap/utils.h"
#include "runtime/memory/mem_tracker_limiter.h"
+#include "runtime/thread_context.h"
#include "util/time.h"
#include "util/trace.h"
@@ -80,7 +81,14 @@ Compaction::Compaction(const TabletSharedPtr& tablet, const
std::string& label)
init_profile(label);
}
-Compaction::~Compaction() {}
+Compaction::~Compaction() {
+ SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(_mem_tracker);
+ _output_rs_writer.reset();
+ _tablet.reset();
+ _input_rowsets.clear();
+ _output_rowset.reset();
+ _cur_tablet_schema.reset();
+}
void Compaction::init_profile(const std::string& label) {
_profile = std::make_unique<RuntimeProfile>(label);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]