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

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

commit 4432d5fdb23b22d5a467d9472a73567640b87ec8
Author: yiguolei <[email protected]>
AuthorDate: Thu Sep 5 16:07:56 2024 +0800

    1. remove revoke memory logic in execute task  2. use memory error code 
when cancel query (#40426)
    
    …
    
    ## Proposed changes
    
    Issue Number: close #xxx
    
    <!--Describe your changes.-->
    
    Co-authored-by: yiguolei <[email protected]>
---
 be/src/pipeline/pipeline_task.cpp  | 1 -
 be/src/pipeline/task_scheduler.cpp | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/pipeline/pipeline_task.cpp 
b/be/src/pipeline/pipeline_task.cpp
index 923b734fc95..c34c40580a9 100644
--- a/be/src/pipeline/pipeline_task.cpp
+++ b/be/src/pipeline/pipeline_task.cpp
@@ -388,7 +388,6 @@ Status PipelineTask::execute(bool* eos) {
                     {
                         _memory_sufficient_dependency->block();
                         
_state->get_query_ctx()->get_pipe_exec_scheduler()->add_paused_task(this);
-                        RETURN_IF_ERROR(_sink->revoke_memory(_state));
                         continue;
                     }
                     has_enough_memory = false;
diff --git a/be/src/pipeline/task_scheduler.cpp 
b/be/src/pipeline/task_scheduler.cpp
index b61e0041e60..0aabeac4933 100644
--- a/be/src/pipeline/task_scheduler.cpp
+++ b/be/src/pipeline/task_scheduler.cpp
@@ -345,7 +345,8 @@ void TaskScheduler::_paused_queries_handler() {
                                  "the query: "
                               << query_id << ", usage: " << max_memory_usage
                               << ", wg info: " << wg->debug_string();
-                    max_memory_usage_query->cancel(Status::InternalError(
+                    // Should use memory exceed error code, so that FE may do 
retry for this error
+                    max_memory_usage_query->cancel(Status::MemoryLimitExceeded(
                             "memory insufficient and cannot find revocable 
query, cancel "
                             "the "
                             "biggest usage({}) query({})",


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

Reply via email to