yiguolei commented on code in PR #39223: URL: https://github.com/apache/doris/pull/39223#discussion_r1716761902
########## be/src/runtime/fragment_mgr.cpp: ########## @@ -880,15 +1012,36 @@ void FragmentMgr::cancel_worker() { } else { for (const auto& it : _query_ctx_map) { if (auto q_ctx = it.second.lock()) { - if (q_ctx->get_fe_process_uuid() == 0) { + const int64_t fe_process_uuid = q_ctx->get_fe_process_uuid(); + + if (fe_process_uuid == 0) { // zero means this query is from a older version fe or // this fe is starting continue; } + // If the query is not running on the any frontends, cancel it. + if (auto itr = running_queries_on_all_fes.find(fe_process_uuid); + itr != running_queries_on_all_fes.end()) { + // Query not found on this frontend, and the query arrives before the last check + if (itr->second.find(it.first) == itr->second.end() && + q_ctx->get_query_arrival_timestamp().tv_nsec < + check_invalid_query_last_timestamp.tv_nsec && + q_ctx->get_query_source() == QuerySource::INTERNAL_FRONTEND) { + queries_pipeline_task_leak.push_back(q_ctx->query_id()); + LOG_INFO( + "Query {}, type {} is not found on any frontends, maybe it " + "is " Review Comment: 这里换行错了 -- 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