EmmyMiao87 commented on a change in pull request #2718: [Insert] Return more 
info of insert operation
URL: https://github.com/apache/incubator-doris/pull/2718#discussion_r366213292
 
 

 ##########
 File path: 
fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
 ##########
 @@ -1220,6 +1214,63 @@ private void updateDBRunningTxnNum(TransactionStatus 
preStatus, TransactionState
         return infos;
     }
     
+    // get show info of a specified txnId
+    public List<List<String>> getSingleTranInfo(long dbId, long txnId) throws 
AnalysisException {
+        List<List<String>> infos = new ArrayList<List<String>>();
+        readLock();
+        try {
+            Database db = Catalog.getInstance().getDb(dbId);
+            if (db == null) {
+                throw new AnalysisException("Database[" + dbId + "] does not 
exist");
+            }
+            
+            TransactionState txnState = idToTransactionState.get(txnId);
+            if (txnState == null) {
+                throw new AnalysisException("transaction with id " + txnId + " 
does not exist");
+            }
+            
+            if (ConnectContext.get() != null) {
 
 Review comment:
   precondition?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to