liaoxin01 commented on code in PR #41267:
URL: https://github.com/apache/doris/pull/41267#discussion_r1774742767
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java:
##########
@@ -1096,17 +1113,24 @@ public void abortTransaction(Long dbId, Long
transactionId, String reason,
Env.getCurrentEnv().getRoutineLoadManager().getJob(rlTaskTxnCommitAttachment.getJobId()).writeUnlock();
}
throw new UserException("abortTxn failed, errMsg:" +
e.getMessage());
- }
+ } finally {
+ TransactionState txnState =
TxnUtil.transactionStateFromPb(abortTxnResponse.getTxnInfo());
+ TxnStateChangeCallback cb = null;
+ if (txnCommitAttachment != null && txnCommitAttachment instanceof
RLTaskTxnCommitAttachment) {
+ RLTaskTxnCommitAttachment rlTaskTxnCommitAttachment =
(RLTaskTxnCommitAttachment) txnCommitAttachment;
+ cb =
callbackFactory.getCallback(rlTaskTxnCommitAttachment.getJobId());
+ } else {
+ cb = callbackFactory.getCallback(txnState.getCallbackId());
+ }
- TransactionState txnState =
TxnUtil.transactionStateFromPb(abortTxnResponse.getTxnInfo());
- TxnStateChangeCallback cb =
callbackFactory.getCallback(txnState.getCallbackId());
Review Comment:
We should reserve this when this isn't routine load task.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]