This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-1.1-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push: new dab362aa60 [improvement](log) print info of error replicas (#14221) dab362aa60 is described below commit dab362aa6069021f78a80cba2e53348865e22119 Author: Yongqiang YANG <98214048+dataroar...@users.noreply.github.com> AuthorDate: Mon Nov 14 09:09:49 2022 +0800 [improvement](log) print info of error replicas (#14221) --- .../apache/doris/transaction/DatabaseTransactionMgr.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 24811d7de8..c6563e2d5b 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 @@ -410,7 +410,7 @@ public class DatabaseTransactionMgr { private void checkCommitStatus(List<Table> tableList, TransactionState transactionState, List<TabletCommitInfo> tabletCommitInfos, TxnCommitAttachment txnCommitAttachment, Set<Long> errorReplicaIds, Map<Long, Set<Long>> tableToPartition, - Set<Long> totalInvolvedBackends) throws UserException { + Set<Long> totalInvolvedBackends) throws UserException { Database db = catalog.getDbOrMetaException(dbId); // update transaction state extra if exists @@ -516,6 +516,7 @@ public class DatabaseTransactionMgr { // save the error replica ids for current tablet // this param is used for log Set<Long> errorBackendIdsForTablet = Sets.newHashSet(); + String errorReplicaInfo = new String(); for (long tabletBackend : tabletBackends) { Replica replica = tabletInvertedIndex.getReplica(tabletId, tabletBackend); if (replica == null) { @@ -530,21 +531,28 @@ public class DatabaseTransactionMgr { // for example, a replica is in clone state if (replica.getLastFailedVersion() < 0) { ++successReplicaNum; + } else { + errorReplicaInfo += " replica [" + replica.getId() + "], lastFailedVersion [" + + replica.getLastFailedVersion() + "]"; } } else { errorBackendIdsForTablet.add(tabletBackend); errorReplicaIds.add(replica.getId()); // not remove rollup task here, because the commit maybe failed // remove rollup task when commit successfully + errorReplicaInfo += " replica [" + replica.getId() + "] commitBackends null or " + + "tabletBackend [" + tabletBackend + "] does not " + + "in commitBackends"; } } if (successReplicaNum < quorumReplicaNum) { LOG.warn("Failed to commit txn [{}]. " + "Tablet [{}] success replica num is {} < quorum replica num {} " - + "while error backends {}", - transactionState.getTransactionId(), tablet.getId(), successReplicaNum, quorumReplicaNum, - Joiner.on(",").join(errorBackendIdsForTablet)); + + "while error backends {} error replica info {}", + transactionState.getTransactionId(), tablet.getId(), successReplicaNum, + quorumReplicaNum, Joiner.on(",").join(errorBackendIdsForTablet), + errorBackendIdsForTablet); throw new TabletQuorumFailedException(transactionState.getTransactionId(), tablet.getId(), successReplicaNum, quorumReplicaNum, errorBackendIdsForTablet); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org