-
Notifications
You must be signed in to change notification settings - Fork 3.6k
branch-4.0: [Fix](ai) Fix _exec_plan_fragment_impl meet unknown error when call AI_Functions #58521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
linrrzqqq
wants to merge
1
commit into
apache:branch-4.0
Choose a base branch
from
linrrzqqq:pick_58363_branch_4_0
base: branch-4.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+367
−18
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…I_Functions (apache#58363) Issue Number: close #xxx Related PR: #xxx Problem Summary: When a query statement contains some Commands(e.g. `UPDATE`), it will cause the AI function call to not go through `NereidsCoordinator` and fallback to `Coordinator`. In this case, the FE will not send `AI_Resources` to the BE, which will lead to errors in subsequent queries and the error messages will not be clear. This pr also replace every directly `throw Status` with `throw Exception(Status...), so the errors can be surfaced as `Exception`, not raw `Status` ```text I20251114 18:00:45.502351 59053 fragment_mgr.cpp:716] query_id: 5c963987bf8340bc-a56b019c8b0b3300, coord_addr: TNetworkAddress(hostname=172.17.6.136, port=9020), total fragment num on current host: 1, fe process uuid: 1763114220687, query type: SELECT, report audit fe:TNetworkAddress(hostname=172.17.6.136, port=9020), use wg:1763112792749,normal W20251114 18:00:45.528087 59053 status.h:438] meet error status: [INTERNAL_ERROR]AI resources not found 0# doris::vectorized::AIFunction<doris::vectorized::FunctionAITranslate>::_init_from_resource(doris::FunctionContext*, doris::vectorized::Block const&, std::vector<unsigned int, std::allocator<unsigned int> > const&, doris::TAIResource&, std::shared_ptr<doris::vectorized::AIAdapter>&) at /home/zcp/repo_center/doris_release/doris/be/src/runtime/query_context.h:268 1# doris::vectorized::AIFunction<doris::vectorized::FunctionAITranslate>::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int, unsigned long) const at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 2# non-virtual thunk to doris::vectorized::AIFunction<doris::vectorized::FunctionAITranslate>::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int, unsigned long) const at /home/zcp/repo_center/doris_release/doris/be/src/vec/functions/ai/ai_functions.h:0 3# doris::vectorized::PreparedFunctionImpl::default_implementation_for_constant_arguments(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int, unsigned long, bool, bool*) const at /home/zcp/repo_center/doris_release/doris/be/src/vec/common/cow.h:0 4# doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int, unsigned long, bool) const at /home/zcp/repo_center/doris_release/doris/be/src/vec/functions/function.cpp:0 5# doris::vectorized::PreparedFunctionImpl::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int, unsigned long, bool) const at /home/zcp/repo_center/doris_release/doris/be/src/vec/functions/function.cpp:249 6# doris::vectorized::IFunctionBase::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int, unsigned long, bool) const at /home/zcp/repo_center/doris_release/doris/be/src/vec/functions/function.h:192 7# doris::vectorized::VectorizedFnCall::_do_execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*, std::vector<unsigned int, std::allocator<unsigned int> >&) at /home/zcp/repo_center/doris_release/doris/be/src/vec/exprs/vectorized_fn_call.cpp:238 8# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_vector.h:375 9# doris::vectorized::VExpr::get_const_col(doris::vectorized::VExprContext*, std::shared_ptr<doris::ColumnPtrWrapper>*) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 10# doris::vectorized::VectorizedFnCall::open(doris::RuntimeState*, doris::vectorized::VExprContext*, doris::FunctionContext::FunctionStateScope) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 11# doris::vectorized::VExprContext::open(doris::RuntimeState*) at /home/zcp/repo_center/doris_release/doris/be/src/vec/exprs/vexpr_context.cpp:0 12# doris::vectorized::VExpr::open(std::vector<std::shared_ptr<doris::vectorized::VExprContext>, std::allocator<std::shared_ptr<doris::vectorized::VExprContext> > > const&, doris::RuntimeState*) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 13# doris::pipeline::UnionSourceOperatorX::prepare(doris::RuntimeState*) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 14# doris::pipeline::Pipeline::prepare(doris::RuntimeState*) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 15# doris::pipeline::PipelineFragmentContext::prepare(doris::ThreadPool*) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:524 16# doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams const&, doris::QuerySource, std::function<void (doris::RuntimeState*, doris::Status*)> const&, doris::TPipelineFragmentParamsList const&) at /home/zcp/repo_center/doris_release/doris/be/src/runtime/fragment_mgr.cpp:0 17# doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams const&, doris::QuerySource, doris::TPipelineFragmentParamsList const&) at /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/std_function.h:245 18# doris::PInternalService::_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_release/doris/be/src/common/status.h:524 19# doris::PInternalService::_exec_plan_fragment_in_pthread(google::protobuf::RpcController*, doris::PExecPlanFragmentRequest const*, doris::PExecPlanFragmentResult*, google::protobuf::Closure*) at /home/zcp/repo_center/doris_release/doris/be/src/service/internal_service.cpp:0 20# doris::WorkThreadPool<false>::work_thread(int) at /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/atomic_base.h:641 21# execute_native_thread_routine 22# start_thread 23# clone I20251114 18:00:45.528275 59053 pipeline_fragment_context.cpp:139] PipelineFragmentContext::~PipelineFragmentContext|query_id=5c963987bf8340bc-a56b019c8b0b3300|fragment_id=0 I20251114 18:00:45.528398 59053 query_context.cpp:240] Query 5c963987bf8340bc-a56b019c8b0b3300 deconstructed, mem_tracker: W20251114 18:00:45.531440 59053 status.h:456] meet error status: [INTERNAL_ERROR]_exec_plan_fragment_impl meet unknown error 0# doris::PInternalService::_exec_plan_fragment_in_pthread(google::protobuf::RpcController*, doris::PExecPlanFragmentRequest const*, doris::PExecPlanFragmentResult*, google::protobuf::Closure*) at /home/zcp/repo_center/doris_release/doris/be/src/service/internal_service.cpp:0 1# doris::WorkThreadPool<false>::work_thread(int) at /usr/local/ldb-toolchain-v0.26/bin/../lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/atomic_base.h:641 2# execute_native_thread_routine 3# start_thread 4# clone W20251114 18:00:45.531484 59053 internal_service.cpp:351] exec plan fragment failed, errmsg=[INTERNAL_ERROR]_exec_plan_fragment_impl meet unknown error ``` - 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: apache/doris-website#1214 --> - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pick: #58363