TangSiyang2001 commented on code in PR #23836:
URL: https://github.com/apache/doris/pull/23836#discussion_r1713267198


##########
fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java:
##########
@@ -134,6 +134,10 @@ public class RollupJobV2 extends AlterJobV2 implements 
GsonPostProcessable {
     @SerializedName(value = "storageFormat")
     private TStorageFormat storageFormat = TStorageFormat.DEFAULT;
 
+    // used for delete decommission tablet
+    @SerializedName(value = "watermarkTxnId")
+    private long watermarkTxnId = -1;
+

Review Comment:
   Name of watermarkTxnId may be too general, could use 
`tabletDeleteWatermarkTxnId`



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java:
##########
@@ -107,6 +108,9 @@ public class TabletInvertedIndex {
 
     private ForkJoinPool taskPool = new 
ForkJoinPool(Runtime.getRuntime().availableProcessors());
 
+    // tablet id -> watermark id
+    private Map<Long, Long> decommissionTabletMap = Maps.newHashMap();

Review Comment:
   Shall we use a concurrent map instead?



##########
fe/fe-core/src/main/java/org/apache/doris/alter/RollupJobV2.java:
##########
@@ -641,6 +645,12 @@ protected boolean cancelImpl(String errMsg) {
             return false;
         }
 
+        try {
+            this.watermarkTxnId =
+                    
Env.getCurrentGlobalTransactionMgr().getNextTransactionId();
+        } catch (Exception e) {
+            LOG.warn("get next transaction id failed");
+        }

Review Comment:
   We could put this field into the abstract class AlterJobV2, and add an 
unified assign method in it, rather than seperate it in each derived class and 
assign it in duplicated way.



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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to