morningman commented on a change in pull request #2182: Sending clear txn task 
explicitly after transaction being aborted
URL: https://github.com/apache/incubator-doris/pull/2182#discussion_r345207588
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/task/ClearTransactionTask.java
 ##########
 @@ -17,41 +17,29 @@
 
 package org.apache.doris.task;
 
-import java.util.List;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
 import org.apache.doris.thrift.TClearTransactionTaskRequest;
 import org.apache.doris.thrift.TTaskType;
 
-public class ClearTransactionTask extends AgentTask {
+import java.util.List;
 
-    private static final Logger LOG = 
LogManager.getLogger(ClearTransactionTask.class);
+public class ClearTransactionTask extends AgentTask {
 
     private long transactionId;
     private List<Long> partitionIds;
-    private boolean isFinished;
 
-    public ClearTransactionTask(long backendId, long transactionId, 
-            List<Long> partitionIds) {
+    public ClearTransactionTask(long backendId, long transactionId, List<Long> 
partitionIds) {
         super(null, backendId, TTaskType.CLEAR_TRANSACTION_TASK, -1L, -1L, 
-1L, -1L, -1L, transactionId);
         this.transactionId = transactionId;
         this.partitionIds = partitionIds;
         this.isFinished = false;
     }
     
     public TClearTransactionTaskRequest toThrift() {
-        TClearTransactionTaskRequest clearTransactionTaskRequest = new 
TClearTransactionTaskRequest(transactionId, 
-                partitionIds);
+        TClearTransactionTaskRequest clearTransactionTaskRequest = new 
TClearTransactionTaskRequest();
+        clearTransactionTaskRequest.setTransaction_id(transactionId);
+        if (partitionIds != null && !partitionIds.isEmpty()) {
 
 Review comment:
   Forget to change it. I will fix it

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to