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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new f0b47431ee2 branch-4.0: [Fix](cloud-mow) Fix Fe memory leak due to 
`txnLastSignatureMap` #59385 (#59419)
f0b47431ee2 is described below

commit f0b47431ee290484d3e8d7c2e4caea54da8300c2
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Dec 29 17:26:04 2025 +0800

    branch-4.0: [Fix](cloud-mow) Fix Fe memory leak due to 
`txnLastSignatureMap` #59385 (#59419)
    
    Cherry-picked from #59385
    
    Co-authored-by: bobhan1 <[email protected]>
---
 .../apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
index 8c636ec678a..31a509a1c87 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
@@ -428,6 +428,8 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
             }
             commitTransactionWithoutLock(dbId, tableList, transactionId, 
tabletCommitInfos, txnCommitAttachment, false,
                     mowTableList, backendToPartitionInfos);
+            // clear signature after commit succeeds
+            clearTxnLastSignature(dbId, transactionId);
         } catch (Exception e) {
             if (!mowTableList.isEmpty()) {
                 LOG.warn("commit txn {} failed, release delete bitmap lock, 
catch exception {}", transactionId,
@@ -1476,6 +1478,8 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
             }
             commitTransactionWithSubTxns(db.getId(), tableList, transactionId, 
subTransactionStates, mowTableList,
                     backendToPartitionInfos);
+            // clear signature after commit succeeds
+            clearTxnLastSignature(db.getId(), transactionId);
         } catch (Exception e) {
             if (!mowTableList.isEmpty()) {
                 LOG.warn("commit txn {} failed, release delete bitmap lock, 
catch exception {}", transactionId,
@@ -1657,6 +1661,8 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
         beforeCommitTransaction(tableList, transactionId, timeoutMillis);
         try {
             commitTransactionWithoutLock(db.getId(), tableList, transactionId, 
tabletCommitInfos, txnCommitAttachment);
+            // Only clear signature after commit succeeds, as BE may retry on 
failure
+            clearTxnLastSignature(db.getId(), transactionId);
         } finally {
             stopWatch.stop();
             long costTimeMs = stopWatch.getTime();
@@ -1724,6 +1730,7 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
             abortTxnResponse = abortTransactionImpl(dbId, transactionId, 
reason, null);
         } finally {
             handleAfterAbort(abortTxnResponse, txnCommitAttachment, 
transactionId);
+            clearTxnLastSignature(dbId, transactionId);
         }
     }
 


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

Reply via email to