From feb72e92e4f2040102852248e5df188c5049bdeb Mon Sep 17 00:00:00 2001 From: Kaijie Chen Date: Thu, 27 Feb 2025 20:13:26 +0800 Subject: [PATCH] [improve](load) improve error message in commit (#48316) In a 3-replica setup, when the BE detects a write error on one replica, it continues submitting the commit information. If the FE checks the commit status and finds that one of the two successful replicas is missing the previous version, an error is returned. However, since the BE does not report the failure reason, the FE's error message does not provide details on the underlying cause. This PR improves the error message for this scenario. It advises users to check the BE logs and SHOW TABLET for more detailed error reasons and suggests retrying the operation later. --- .../apache/doris/transaction/DatabaseTransactionMgr.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java index a4dcd877ac3f73..cc2a4b1a90f20c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java @@ -635,7 +635,7 @@ private void checkCommitStatus(List tableList, TransactionState transacti String errMsg = String.format("Failed to commit txn %s, cause tablet %s succ replica num %s" + " < load required replica num %s. table %s, partition: [ id=%s, commit version %s" - + ", visible version %s ], this tablet detail: %s", + + ", visible version %s ], this tablet detail: %s. Please try again later.", transactionId, tablet.getId(), successReplicaNum, loadRequiredReplicaNum, tableId, partition.getId(), partition.getCommittedVersion(), partition.getVisibleVersion(), writeDetail); @@ -659,14 +659,14 @@ private String getTabletWriteDetail(List tabletSuccReplicas, List replica.toStringSimple(true)) .collect(Collectors.toList()))); } if (!tabletVersionFailedReplicas.isEmpty()) { writeDetail += String.format("%s replicas write data succ but miss previous " - + "version: { %s }.", + + "version: { %s }, please check output of SHOW TABLET for details", tabletVersionFailedReplicas.size(), Joiner.on(",").join( tabletVersionFailedReplicas.stream().map(replica -> replica.toStringSimple(true)) .collect(Collectors.toList())));