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 38a3d6fdae4 [fix](transaction) limit abort txn reason to avoid value length exceeds limit error (#50152) 38a3d6fdae4 is described below commit 38a3d6fdae4c2d981b3f21a2167ad8c2e4806ff9 Author: hui lai <lai...@selectdb.com> AuthorDate: Mon Apr 21 10:18:30 2025 +0800 [fix](transaction) limit abort txn reason to avoid value length exceeds limit error (#50152) ### What problem does this PR solve? Abort transaction fail: ``` W20250414 13:59:36.871497 2527221 txn_kv.cpp:543] fdb commit error, code=2103 msg=Value length exceeds limit I20250414 13:59:36.871556 2527221 meta_service_helper.h:156] finish abort_txn from 10.5.25.196:59646 response=status { code: INVALID_ARGUMENT msg: "failed to commit kv txn, txn_id=78993731163591680 err=Value length exceeds limit" } ``` root cause is abort reason is too long, this pr limits abort reason to avoid value length exceeds limit error. --- .../org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java | 3 +++ 1 file changed, 3 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 9d815a85a3b..7744a48b352 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 @@ -1403,6 +1403,9 @@ public class CloudGlobalTransactionMgr implements GlobalTransactionMgrIface { LOG.info("try to abort transaction, dbId:{}, transactionId:{}, reason: {}", dbId, transactionId, reason); AbortTxnRequest.Builder builder = AbortTxnRequest.newBuilder(); + if (reason != null && reason.length() > 1024) { + reason = reason.substring(0, 1024) + " ... (reason is truncated, check fe.log with txnId for details)"; + } builder.setDbId(dbId); builder.setTxnId(transactionId); builder.setReason(reason); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org