yiguolei commented on code in PR #42053: URL: https://github.com/apache/doris/pull/42053#discussion_r1809779870
########## be/src/olap/memtable_flush_executor.cpp: ########## @@ -100,7 +104,16 @@ Status FlushToken::submit(std::shared_ptr<MemTable> mem_table) { int64_t submit_task_time = MonotonicNanos(); auto task = MemtableFlushTask::create_shared( shared_from_this(), mem_table, _rowset_writer->allocate_segment_id(), submit_task_time); - Status ret = _thread_pool->submit(std::move(task)); + // NOTE: we should guarantee WorkloadGroup is not deconstructed when submit memtable flush task. + // because currently WorkloadGroup's can only be destroyed when all queries in the group is finished, + // but not consider whether load channel is finish. + std::shared_ptr<WorkloadGroup> wg_sptr = workload_group_sptr(); Review Comment: _wg_wptr.lock(); -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org