gavinchou commented on code in PR #41718:
URL: https://github.com/apache/doris/pull/41718#discussion_r1797192254


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/TxnUtil.java:
##########


Review Comment:
   consider move TxnUtil to apache/doris/transaction/



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/TxnUtil.java:
##########
@@ -366,4 +377,46 @@ public static TransactionState 
transactionStateFromPb(TxnInfoPB txnInfo) {
         }
         return transactionState;
     }
+
+    public static List<String> getTxnStateInfo(TransactionState txnState, 
List<String> info) {
+        info.add(String.valueOf(txnState.getTransactionId()));
+        info.add(txnState.getLabel());
+        info.add(txnState.getCoordinator().toString());
+        info.add(txnState.getTransactionStatus().name());
+        info.add(txnState.getSourceType().name());
+        info.add(TimeUtils.longToTimeString(txnState.getPrepareTime()));
+        info.add(TimeUtils.longToTimeString(txnState.getPreCommitTime()));
+        info.add(TimeUtils.longToTimeString(txnState.getCommitTime()));
+        
info.add(TimeUtils.longToTimeString(txnState.getLastPublishVersionTime()));
+        info.add(TimeUtils.longToTimeString(txnState.getFinishTime()));
+        info.add(txnState.getReason());
+        info.add(String.valueOf(txnState.getErrorReplicas().size()));
+        info.add(String.valueOf(txnState.getCallbackId()));
+        info.add(String.valueOf(txnState.getTimeoutMs()));
+        info.add(txnState.getErrMsg());
+        return info;
+    }
+
+    public static void checkAuth(long dbId, TransactionState txnState) throws 
AnalysisException {

Review Comment:
   ditto



##########
fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/TxnUtil.java:
##########
@@ -366,4 +377,46 @@ public static TransactionState 
transactionStateFromPb(TxnInfoPB txnInfo) {
         }
         return transactionState;
     }
+
+    public static List<String> getTxnStateInfo(TransactionState txnState, 
List<String> info) {

Review Comment:
   keep it in DatabaseTransactionMgr



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to