morningman commented on a change in pull request #2781: Batch Operate Rollup 
table in Doris #2671
URL: https://github.com/apache/incubator-doris/pull/2781#discussion_r376709508
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/alter/MaterializedViewHandler.java
 ##########
 @@ -507,6 +608,12 @@ private long checkAndGetBaseIndex(String baseIndexName, 
OlapTable olapTable) thr
         return baseIndexId;
     }
 
+    public void processBatchDropRollup (List<AlterClause> dropRollupClauses, 
Database db, OlapTable olapTable) throws DdlException {
+        for (AlterClause dropRollupClause : dropRollupClauses) {
+            processDropRollup((DropRollupClause)dropRollupClause, db, 
olapTable);
 
 Review comment:
   "batch drop rollup" operation should still be atomic when writing meta log.
   So you need to modify the `processDropRollup()`:
   
   1. First, traverse all drop clauses to validate them, such as whether to 
drop the base index, does the rollup index need to be dropped exist.
   
   2. Do the real drop operation. And all-or-non rollups should be dropped.
   
   3. Write a edit log named `BatchDropRollupOperationLog` to persist the meta.
   
   

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