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

dataroaring 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 cae6429ab17 [fix](cloud) fix routine load job state can not changed 
correctly (#37347)
cae6429ab17 is described below

commit cae6429ab176b05c472b65e7a2f09dedb3e48969
Author: hui lai <[email protected]>
AuthorDate: Sat Jul 6 16:28:26 2024 +0800

    [fix](cloud) fix routine load job state can not changed correctly (#37347)
    
    ## Proposed changes
    
    introduce by https://github.com/apache/doris/pull/36237
    
    If meets some error like `out of range`, routine load job state should
    change from running to pause.
    
    When rollback transaction, the RPC will send to meta service directly,
    which can not change state by transaction information.
    
    This pr sends RPC to FE first to solve this problem.
---
 be/src/cloud/cloud_stream_load_executor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/cloud/cloud_stream_load_executor.cpp 
b/be/src/cloud/cloud_stream_load_executor.cpp
index 92fb73eacc1..a87f37a5188 100644
--- a/be/src/cloud/cloud_stream_load_executor.cpp
+++ b/be/src/cloud/cloud_stream_load_executor.cpp
@@ -134,7 +134,7 @@ void 
CloudStreamLoadExecutor::rollback_txn(StreamLoadContext* ctx) {
                           : !ctx->label.empty() ? TxnOpParamType::WITH_LABEL
                                                 : TxnOpParamType::ILLEGAL;
 
-    if (topt == TxnOpParamType::WITH_TXN_ID) {
+    if (topt == TxnOpParamType::WITH_TXN_ID && ctx->load_type != 
TLoadType::ROUTINE_LOAD) {
         VLOG_DEBUG << "abort stream load txn directly: " << op_info;
         
WARN_IF_ERROR(_exec_env->storage_engine().to_cloud().meta_mgr().abort_txn(*ctx),
                       "failed to rollback txn " + op_info);


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

Reply via email to