This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 79f6b647d57 [FIX] should check fe host standing when coordinator is 
not found.  (#37772)
79f6b647d57 is described below

commit 79f6b647d575744af2649c147457d9ad86d1f28b
Author: zhiqiang <seuhezhiqi...@163.com>
AuthorDate: Mon Jul 15 12:27:31 2024 +0800

    [FIX] should check fe host standing when coordinator is not found.  (#37772)
    
    fix https://github.com/apache/doris/pull/37707
---
 be/src/runtime/fragment_mgr.cpp | 68 ++++++++++++++++++++---------------------
 1 file changed, 33 insertions(+), 35 deletions(-)

diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index c2f16e1d05a..6846782dd8e 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -1178,46 +1178,44 @@ void FragmentMgr::cancel_worker() {
 
                     auto itr = running_fes.find(query_context->coord_addr);
                     if (itr != running_fes.end()) {
-                        if (query_context->get_fe_process_uuid() == 
itr->second.info.process_uuid ||
+                        if (q.second->get_fe_process_uuid() == 
itr->second.info.process_uuid ||
                             itr->second.info.process_uuid == 0) {
                             continue;
                         } else {
-                            // In some rear cases, the rpc port of follower is 
not updated in time,
-                            // then the port of this follower will be zero, 
but acutally it is still running,
-                            // and be has already received the query from 
follower.
-                            // So we need to check if host is in running_fes.
-                            bool fe_host_is_standing = std::any_of(
-                                    running_fes.begin(), running_fes.end(),
-                                    [query_context](const auto& fe) {
-                                        return fe.first.hostname ==
-                                                       
query_context->coord_addr.hostname &&
-                                               fe.first.port == 0;
-                                    });
-                            if (fe_host_is_standing) {
-                                LOG_WARNING(
-                                        "Coordinator {}:{} is not found, but 
its host is still "
-                                        "running with an unstable brpc port, 
not going to cancel "
-                                        "it.",
-                                        query_context->coord_addr.hostname,
-                                        query_context->coord_addr.port,
-                                        print_id(query_context->query_id()));
-                                continue;
-                            } else {
-                                LOG_WARNING(
-                                        "Could not find target coordinator 
{}:{} of query {}, "
-                                        "going to "
-                                        "cancel it.",
-                                        query_context->coord_addr.hostname,
-                                        query_context->coord_addr.port,
-                                        print_id(query_context->query_id()));
-                            }
+                            LOG_WARNING("Coordinator of query {} restarted, 
going to cancel it.",
+                                        print_id(q.second->query_id()));
                         }
                     } else {
-                        LOG_WARNING(
-                                "Could not find target coordinator {}:{} of 
query {}, going to "
-                                "cancel it.",
-                                query_context->coord_addr.hostname, 
query_context->coord_addr.port,
-                                print_id(query_context->query_id()));
+                        // In some rear cases, the rpc port of follower is not 
updated in time,
+                        // then the port of this follower will be zero, but 
acutally it is still running,
+                        // and be has already received the query from follower.
+                        // So we need to check if host is in running_fes.
+                        bool fe_host_is_standing =
+                                std::any_of(running_fes.begin(), 
running_fes.end(),
+                                            [query_context](const auto& fe) {
+                                                return fe.first.hostname ==
+                                                               
query_context->coord_addr.hostname &&
+                                                       fe.first.port == 0;
+                                            });
+
+                        if (fe_host_is_standing) {
+                            LOG_WARNING(
+                                    "Coordinator {}:{} is not found, but its 
host is still "
+                                    "running with an unstable rpc port, not 
going to cancel "
+                                    "it.",
+                                    query_context->coord_addr.hostname,
+                                    query_context->coord_addr.port,
+                                    print_id(query_context->query_id()));
+                            continue;
+                        } else {
+                            LOG_WARNING(
+                                    "Could not find target coordinator {}:{} 
of query {}, "
+                                    "going to "
+                                    "cancel it.",
+                                    query_context->coord_addr.hostname,
+                                    query_context->coord_addr.port,
+                                    print_id(query_context->query_id()));
+                        }
                     }
 
                     // Coorninator of this query has already dead.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to