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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 3f1414d0237 [fix](cloud) fix routine load job state can not changed 
correctly (#37347)
3f1414d0237 is described below

commit 3f1414d0237557621dca6771dcdb375694b06773
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