This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 994c56f914d [fix](txn) fix abortTxn by label does not acquire table
write lock (#38777) (#38842)
994c56f914d is described below
commit 994c56f914dafd8e1ece2f14ed105af95c19d3c7
Author: meiyi <[email protected]>
AuthorDate: Mon Aug 5 16:33:20 2024 +0800
[fix](txn) fix abortTxn by label does not acquire table write lock (#38777)
(#38842)
pick https://github.com/apache/doris/pull/38777
---
.../java/org/apache/doris/transaction/GlobalTransactionMgr.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
b/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
index 24d92849b49..928fa785507 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
@@ -347,8 +347,11 @@ public class GlobalTransactionMgr implements Writable {
// for http cancel stream load api
public void abortTransaction(Long dbId, String label, String reason)
throws UserException {
- DatabaseTransactionMgr dbTransactionMgr =
getDatabaseTransactionMgr(dbId);
- dbTransactionMgr.abortTransaction(label, reason);
+ Long txnId = getTransactionId(dbId, label);
+ if (txnId == null) {
+ throw new AnalysisException("txn with label " + label + " does not
exist");
+ }
+ abortTransaction(dbId, txnId, reason);
}
public void abortTransaction2PC(Long dbId, long transactionId, List<Table>
tableList) throws UserException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]