[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.
This commit is contained in:
@ -1364,7 +1364,8 @@ public class DatabaseTransactionMgr {
|
||||
}
|
||||
|
||||
public int getTransactionNum() {
|
||||
return idToRunningTransactionState.size() + idToFinalStatusTransactionState.size();
|
||||
return idToRunningTransactionState.size() + finalStatusTransactionStateDequeShort.size() +
|
||||
finalStatusTransactionStateDequeLong.size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user