Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions be/src/io/fs/multi_table_pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,19 @@ void MultiTablePipe::_handle_consumer_finished() {
_ctx->number_filtered_rows = _number_filtered_rows;
_ctx->number_unselected_rows = _number_unselected_rows;
_ctx->commit_infos = _tablet_commit_infos;

// remove ctx to avoid memory leak.
for (const auto& pair : _planned_tables) {
if (pair.second) {
doris::ExecEnv::GetInstance()->new_load_stream_mgr()->remove(pair.second->id);
}
}
for (const auto& pair : _unplanned_tables) {
if (pair.second) {
doris::ExecEnv::GetInstance()->new_load_stream_mgr()->remove(pair.second->id);
}
}

LOG(INFO) << "all plan for multi-table load complete. number_total_rows="
<< _ctx->number_total_rows << " number_loaded_rows=" << _ctx->number_loaded_rows
<< " number_filtered_rows=" << _ctx->number_filtered_rows
Expand Down