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

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


The following commit(s) were added to refs/heads/master by this push:
     new 77485f35388 [enhancement](log) should print query id when failed to 
get fragment context (#51697)
77485f35388 is described below

commit 77485f35388333c4594a1dfea94a3ca05f537ec5
Author: yiguolei <[email protected]>
AuthorDate: Mon Jun 16 18:55:58 2025 +0800

    [enhancement](log) should print query id when failed to get fragment 
context (#51697)
    
    ### What problem does this PR solve?
    
    Sometimes, we meet this error:
    
    W20250612 14:33:54.967048 711790 status.h:412] meet error status:
    [INTERNAL_ERROR]Failed to get query fragments context. Query may be
    timeout or be cancelled. host: 10.64.35.104
    
    0# doris::Status
    
doris::FragmentMgr::_get_query_ctx<doris::TPipelineFragmentParams>(doris::TPipelineFragmentParams
    const&, doris::TUniqueId, bool, std::shared_ptr<doris::QueryContext>&)
    at /home/zcp/repo_center/doris_enterprise/doris/be/src/common/status.h:0
    1# doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams
    const&, std::function<void (doris::RuntimeState*, doris::Status*)>
    const&) at
    
/home/zcp/repo_center/doris_enterprise/doris/be/src/runtime/fragment_mgr.cpp:0
    2# doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams
    const&) at
    
/var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:244
    3#
    
doris::PInternalServiceImpl::_exec_plan_fragment_impl(std::__cxx11::basic_string<char,
    std::char_traits<char>, std::allocator<char> > const&,
    doris::PFragmentRequestVersion, bool, std::function<void
    (doris::RuntimeState*, doris::Status*)> const&) at
    
/home/zcp/repo_center/doris_enterprise/doris/be/src/service/internal_service.cpp:0
    4#
    
doris::PInternalServiceImpl::_exec_plan_fragment_in_pthread(google::protobuf::RpcController*,
    doris::PExecPlanFragmentRequest const*, doris::PExecPlanFragmentResult*,
    google::protobuf::Closure*) at
    /home/zcp/repo_center/doris_enterprise/doris/be/src/common/status.h:377
    5# doris::WorkThreadPool<false>::work_thread(int) at
    
/var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:646
    6# execute_native_thread_routine at
    
/data/gcc-11.1.0/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/unique_ptr.h:85
            7#  ?
            8#  clone
    
    but we do not know which query.
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test <!-- At least one of them must be included. -->
        - [ ] Regression test
        - [ ] Unit Test
        - [ ] Manual test (add detailed scripts or steps below)
        - [ ] No need to test or manual test. Explain why:
    - [ ] This is a refactor/code format and no logic has been changed.
            - [ ] Previous test can cover this change.
            - [ ] No code files have been changed.
            - [ ] Other reason <!-- Add your reason?  -->
    
    - Behavior changed:
        - [ ] No.
        - [ ] Yes. <!-- Explain the behavior change -->
    
    - Does this need documentation?
        - [ ] No.
    - [ ] Yes. <!-- Add document PR link here. eg:
    https://github.com/apache/doris-website/pull/1214 -->
    
    ### Check List (For Reviewer who merge this PR)
    
    - [ ] Confirm the release note
    - [ ] Confirm test cases
    - [ ] Confirm document
    - [ ] Add branch pick label <!-- Add branch pick label that this PR
    should merge into -->
---
 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 e81852f97f0..230cb12a110 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -646,9 +646,9 @@ Status FragmentMgr::start_query_execution(const 
PExecPlanFragmentStartRequest* r
         LOG_INFO("Query {} start execution", print_id(query_id));
     } else {
         return Status::InternalError(
-                "Failed to get query fragments context. Query may be "
+                "Failed to get query fragments context. Query {} may be "
                 "timeout or be cancelled. host: {}",
-                BackendOptions::get_localhost());
+                print_id(query_id), BackendOptions::get_localhost());
     }
     return Status::OK();
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to