kevinrr888 commented on code in PR #5433:
URL: https://github.com/apache/accumulo/pull/5433#discussion_r2021072481


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -1511,15 +1511,13 @@ private void changeTableState(String tableName, boolean 
wait, TableState newStat
     switch (newState) {
       case OFFLINE:
         op = TFateOperation.TABLE_OFFLINE;
-        if (tableName.equals(AccumuloTable.METADATA.tableName())
-            || tableName.equals(AccumuloTable.ROOT.tableName())) {
-          throw new AccumuloException("Cannot set table to offline state");
-        }
+        NOT_BUILTIN_TABLE.validate(tableName);

Review Comment:
   Adding something to `AccumuloTable` for the check seems good to me.
   As for what system tables are allowed what ops, I'm not sure the `FATE` 
table should ever be deleted, but maybe there is a case where it should be...
   
   > I also saw that there was a possibility that the scan ref table could 
actually be deleted
   
   This cannot be done in 4.0, and I don't think scan ref exists in 2.1:
   
https://github.com/apache/accumulo/blob/8353f3e91457583719fa27381406b155cc1eec24/server/manager/src/main/java/org/apache/accumulo/manager/FateServiceHandler.java#L373-L377



-- 
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: notifications-unsubscr...@accumulo.apache.org

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

Reply via email to