File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,19 @@ void MultiTablePipe::_handle_consumer_finished() {
326
326
_ctx->number_filtered_rows = _number_filtered_rows;
327
327
_ctx->number_unselected_rows = _number_unselected_rows;
328
328
_ctx->commit_infos = _tablet_commit_infos;
329
+
330
+ // remove ctx to avoid memory leak.
331
+ for (const auto & pair : _planned_tables) {
332
+ if (pair.second ) {
333
+ doris::ExecEnv::GetInstance ()->new_load_stream_mgr ()->remove (pair.second ->id );
334
+ }
335
+ }
336
+ for (const auto & pair : _unplanned_tables) {
337
+ if (pair.second ) {
338
+ doris::ExecEnv::GetInstance ()->new_load_stream_mgr ()->remove (pair.second ->id );
339
+ }
340
+ }
341
+
329
342
LOG (INFO) << " all plan for multi-table load complete. number_total_rows="
330
343
<< _ctx->number_total_rows << " number_loaded_rows=" << _ctx->number_loaded_rows
331
344
<< " number_filtered_rows=" << _ctx->number_filtered_rows
You can’t perform that action at this time.
0 commit comments