ctubbsii commented on a change in pull request #2175: URL: https://github.com/apache/accumulo/pull/2175#discussion_r657490394
########## File path: server/manager/src/main/java/org/apache/accumulo/manager/tableOps/delete/PreDeleteTable.java ########## @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.accumulo.manager.tableOps.delete; + +import org.apache.accumulo.core.data.NamespaceId; +import org.apache.accumulo.core.data.TableId; +import org.apache.accumulo.fate.Repo; +import org.apache.accumulo.manager.Manager; +import org.apache.accumulo.manager.tableOps.compact.cancel.CancelCompactions; + +public class PreDeleteTable extends CancelCompactions { Review comment: Because classes are serialized to ZK, making this a subclass could have unintended consequences. I think the implementation that reuses a method is safer than subclassing, and gives us more options moving forward to change the implementation with something that blocks future compactions as well as canceling existing ones, without being tightly coupled to the other implementation. The code we'd be inheriting from the CancelCompactions is trivial anyway, and I was thinking the lock name shouldn't be "COMPACT_CANCEL" anyway, since that's not the tableOp being performed. The read lock should be getting a read lock for "DELETE" anyway, so it shouldn't use the superclass impl, as this would be less confusing in the log messages (which is all the TableOperations enum is used for). -- 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: [email protected]
