You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Tanya-W (via GitHub)" <gi...@apache.org> on 2023/06/09 13:54:22 UTC

[GitHub] [doris] Tanya-W commented on a diff in pull request #20480: [fix](alter) fix potential concurrent issue for alter when check olap table state normal outside write lock scope is not atomic

Tanya-W commented on code in PR #20480:
URL: https://github.com/apache/doris/pull/20480#discussion_r1224337777


##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -2471,13 +2466,6 @@ public void modifyTableLightSchemaChange(Database db, OlapTable olapTable,
             throws DdlException {
 
         LOG.debug("indexSchemaMap:{}, indexes:{}", indexSchemaMap, indexes);
-        if (olapTable.getState() == OlapTableState.ROLLUP) {
-            throw new DdlException("Table[" + olapTable.getName() + "]'s is doing ROLLUP job");
-        }
-
-        // for now table's state can only be NORMAL
-        Preconditions.checkState(olapTable.getState() == OlapTableState.NORMAL, olapTable.getState().name());
-

Review Comment:
   Is ok removing this check here? I think here also need `olapTable.checkNormalStateForAlter();`



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -1489,21 +1489,9 @@ public long getReplicaCount() {
         return replicaCount;
     }
 
-    public void checkStableAndNormal(String clusterName) throws DdlException {
+    public void checkNormalStateForAlter() throws DdlException {
         if (state != OlapTableState.NORMAL) {
-            throw new DdlException("Table[" + name + "]'s state is not NORMAL. "
-                    + "Do not allow doing materialized view");
-        }
-        // check if all tablets are healthy, and no tablet is in tablet scheduler
-        boolean isStable = isStable(Env.getCurrentSystemInfo(),

Review Comment:
   why remove this logic which check all tablets healthy?



-- 
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-unsubscribe@doris.apache.org

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


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