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 77349ca71a1 [pipelineX](fix) Fix coredump by incorrect cancel order
(#33294)
77349ca71a1 is described below
commit 77349ca71a1434d2fee814fb38e31277596ab6d7
Author: Gabriel <[email protected]>
AuthorDate: Sun Apr 7 12:05:22 2024 +0800
[pipelineX](fix) Fix coredump by incorrect cancel order (#33294)
---
be/src/runtime/query_context.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/runtime/query_context.cpp b/be/src/runtime/query_context.cpp
index 681d0e333c7..2fedfc7814c 100644
--- a/be/src/runtime/query_context.cpp
+++ b/be/src/runtime/query_context.cpp
@@ -158,13 +158,14 @@ void QueryContext::set_execution_dependency_ready() {
}
void QueryContext::cancel(std::string msg, Status new_status, int fragment_id)
{
+ // we must get this wrong status once query ctx's `_is_cancelled` = true.
+ set_exec_status(new_status);
// Just for CAS need a left value
bool false_cancel = false;
if (!_is_cancelled.compare_exchange_strong(false_cancel, true)) {
return;
}
DCHECK(!false_cancel && _is_cancelled);
- set_exec_status(new_status);
set_ready_to_execute(true);
std::vector<std::weak_ptr<pipeline::PipelineFragmentContext>>
ctx_to_cancel;
@@ -184,7 +185,6 @@ void QueryContext::cancel(std::string msg, Status
new_status, int fragment_id) {
pipeline_ctx->cancel(PPlanFragmentCancelReason::INTERNAL_ERROR,
msg);
}
}
- return;
}
void QueryContext::cancel_all_pipeline_context(const
PPlanFragmentCancelReason& reason,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]