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 0391e1c877d [Fix](cloud-mow) Fix Fe memory leak due to 
`txnLastSignatureMap` (#59385)
0391e1c877d is described below

commit 0391e1c877d77d8090485a4be987ce4b6564d544
Author: bobhan1 <[email protected]>
AuthorDate: Sat Dec 27 02:08:02 2025 +0800

    [Fix](cloud-mow) Fix Fe memory leak due to `txnLastSignatureMap` (#59385)
    
    ### What problem does this PR solve?
    
    introduced in https://github.com/apache/doris/pull/50417
    
    entry in `txnLastSignatureMap` is not cleared when the commit is
    launched by BE
---
 .../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 65f9a0efd78..f06278329be 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,
@@ -1498,6 +1500,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,
@@ -1679,6 +1683,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();
@@ -1746,6 +1752,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