You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/25 05:58:30 UTC
[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request
#1029: Modify transaction proc info
EmmyMiao87 commented on a change in pull request #1029: Modify transaction proc info
URL: https://github.com/apache/incubator-doris/pull/1029#discussion_r278403890
##########
File path: fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
##########
@@ -1164,16 +1164,32 @@ private void updateDBRunningTxnNum(TransactionStatus preStatus, TransactionState
return infos;
}
- public List<List<Comparable>> getDbTransInfo(long dbId, int limit) throws AnalysisException {
+ public List<List<String>> getDbTransStateInfo(long dbId) {
+ List<List<String>> infos = Lists.newArrayList();
+ readLock();
+ try {
+ infos.add(Lists.newArrayList("running", String.valueOf(runningTxnNums.getOrDefault(dbId, 0))));
+ long runningNum = idToTransactionState.values().stream().filter(
+ t -> (t.getDbId() == dbId && t.getTransactionStatus().isFinalStatus())).count();
+ infos.add(Lists.newArrayList("finished", String.valueOf(runningNum)));
Review comment:
```suggestion
infos.add(Lists.newArrayList("finished", String.valueOf(finishedNum)));
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org