[fix](profile) fix error set with peak_memory_usage in pipeline #27749

This commit is contained in:
Mryange
2023-12-02 14:12:38 +08:00
committed by GitHub
parent 2e1ce758f1
commit 10483ea12c
8 changed files with 24 additions and 20 deletions

View File

@ -200,6 +200,9 @@ void ExecNode::release_resource(doris::RuntimeState* state) {
_is_resource_released = true;
}
if (_peak_memory_usage_counter) {
_peak_memory_usage_counter->set(_mem_tracker->peak_consumption());
}
}
Status ExecNode::close(RuntimeState* state) {
@ -218,9 +221,6 @@ Status ExecNode::close(RuntimeState* state) {
result = st;
}
}
if (_peak_memory_usage_counter) {
_peak_memory_usage_counter->set(_mem_tracker->peak_consumption());
}
release_resource(state);
LOG(INFO) << "query= " << print_id(state->query_id())
<< ", fragment_instance_id=" << print_id(state->fragment_instance_id())