@@ -428,6 +428,8 @@ public void commitTransactionWithoutLock(long dbId, List<Table> tableList, long
428428 }
429429 commitTransactionWithoutLock (dbId , tableList , transactionId , tabletCommitInfos , txnCommitAttachment , false ,
430430 mowTableList , backendToPartitionInfos );
431+ // clear signature after commit succeeds
432+ clearTxnLastSignature (dbId , transactionId );
431433 } catch (Exception e ) {
432434 if (!mowTableList .isEmpty ()) {
433435 LOG .warn ("commit txn {} failed, release delete bitmap lock, catch exception {}" , transactionId ,
@@ -1498,6 +1500,8 @@ public boolean commitAndPublishTransaction(DatabaseIf db, long transactionId,
14981500 }
14991501 commitTransactionWithSubTxns (db .getId (), tableList , transactionId , subTransactionStates , mowTableList ,
15001502 backendToPartitionInfos );
1503+ // clear signature after commit succeeds
1504+ clearTxnLastSignature (db .getId (), transactionId );
15011505 } catch (Exception e ) {
15021506 if (!mowTableList .isEmpty ()) {
15031507 LOG .warn ("commit txn {} failed, release delete bitmap lock, catch exception {}" , transactionId ,
@@ -1679,6 +1683,8 @@ public boolean commitAndPublishTransaction(DatabaseIf db, List<Table> tableList,
16791683 beforeCommitTransaction (tableList , transactionId , timeoutMillis );
16801684 try {
16811685 commitTransactionWithoutLock (db .getId (), tableList , transactionId , tabletCommitInfos , txnCommitAttachment );
1686+ // Only clear signature after commit succeeds, as BE may retry on failure
1687+ clearTxnLastSignature (db .getId (), transactionId );
16821688 } finally {
16831689 stopWatch .stop ();
16841690 long costTimeMs = stopWatch .getTime ();
@@ -1746,6 +1752,7 @@ public void abortTransaction(Long dbId, Long transactionId, String reason,
17461752 abortTxnResponse = abortTransactionImpl (dbId , transactionId , reason , null );
17471753 } finally {
17481754 handleAfterAbort (abortTxnResponse , txnCommitAttachment , transactionId );
1755+ clearTxnLastSignature (dbId , transactionId );
17491756 }
17501757 }
17511758
0 commit comments