From ee3a942314a34864f7dde6e0b1b3c19becbf2601 Mon Sep 17 00:00:00 2001 From: zhiqiang-hhhh Date: Wed, 21 Aug 2024 21:52:26 +0800 Subject: [PATCH 1/2] FIX --- be/src/runtime/fragment_mgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp index 2e69bb3415285a..9abf699559d696 100644 --- a/be/src/runtime/fragment_mgr.cpp +++ b/be/src/runtime/fragment_mgr.cpp @@ -1003,8 +1003,8 @@ void FragmentMgr::cancel_worker() { 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_arrival_timestamp().tv_sec < + check_invalid_query_last_timestamp.tv_sec && q_ctx->get_query_source() == QuerySource::INTERNAL_FRONTEND) { queries_pipeline_task_leak.push_back(q_ctx->query_id()); LOG_INFO( From 12098132e87cd58b99f051254fbae9930b4be940 Mon Sep 17 00:00:00 2001 From: zhiqiang-hhhh Date: Thu, 22 Aug 2024 11:29:58 +0800 Subject: [PATCH 2/2] C --- be/src/runtime/fragment_mgr.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp index 9abf699559d696..58bd2681ea7a62 100644 --- a/be/src/runtime/fragment_mgr.cpp +++ b/be/src/runtime/fragment_mgr.cpp @@ -1003,6 +1003,8 @@ void FragmentMgr::cancel_worker() { 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() && + // tv_nsec represents the number of nanoseconds that have elapsed since the time point stored in tv_sec. + // tv_sec is enough, we do not need to check tv_nsec. q_ctx->get_query_arrival_timestamp().tv_sec < check_invalid_query_last_timestamp.tv_sec && q_ctx->get_query_source() == QuerySource::INTERNAL_FRONTEND) {