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 979542088cfe0a5717323312310358677c593685 Author: dataroaring <[email protected]> AuthorDate: Mon Apr 25 09:59:18 2022 +0800 [Fixbug]assure transaction num in image file is right (#9181) For now, dbTransactionManager::getTransactionNum is only used by checkpoint to get transaction num to put into a image file. However, transactions written into a image file do not come from the same data structure as the num comes. Thus, we should pay much attention to assure two data structue is consistent on size. Actually, it is very difficult to do so. This patch just let getTransactionNum get number from the same data structure as write method. The change was introduced by b93e841688. --- .../main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 f26a4a773a..83585ffe32 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 @@ -1364,7 +1364,8 @@ public class DatabaseTransactionMgr { } public int getTransactionNum() { - return idToRunningTransactionState.size() + idToFinalStatusTransactionState.size(); + return idToRunningTransactionState.size() + finalStatusTransactionStateDequeShort.size() + + finalStatusTransactionStateDequeLong.size(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
