This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch dev-1.0.1 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit 0db1a3c57fa01b3b285c28eba761e052b296b5c5 Author: caiconghui <[email protected]> AuthorDate: Fri Mar 18 09:31:51 2022 +0800 [fix](tablet-report) Fix bug that tabletReport function of ReportHandler in fe may throw NullPointerException due to transaction check logic (#8481) --- .../org/apache/doris/catalog/TabletInvertedIndex.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java index 3753ba5..28e2569 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java @@ -212,20 +212,8 @@ public class TabletInvertedIndex { + "clear it from backend [{}]", transactionId, backendId); } else if (transactionState.getTransactionStatus() == TransactionStatus.VISIBLE) { TableCommitInfo tableCommitInfo = transactionState.getTableCommitInfo(tabletMeta.getTableId()); - PartitionCommitInfo partitionCommitInfo = tableCommitInfo.getPartitionCommitInfo(partitionId); - if (partitionCommitInfo == null) { - /* - * This may happen as follows: - * 1. txn is committed on BE, and report commit info to FE - * 2. FE received report and begin to assemble partitionCommitInfos. - * 3. At the same time, some of partitions have been dropped, so partitionCommitInfos does not contain these partitions. - * 4. So we will not able to get partitionCommitInfo here. - * - * Just print a log to observe - */ - LOG.info("failed to find partition commit info. table: {}, partition: {}, tablet: {}, txn id: {}", - tabletMeta.getTableId(), partitionId, tabletId, transactionState.getTransactionId()); - } else { + PartitionCommitInfo partitionCommitInfo = tableCommitInfo == null ? null : tableCommitInfo.getPartitionCommitInfo(partitionId); + if (partitionCommitInfo != null) { TPartitionVersionInfo versionInfo = new TPartitionVersionInfo(tabletMeta.getPartitionId(), partitionCommitInfo.getVersion(), 0); synchronized (transactionsToPublish) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
