Apache9 commented on code in PR #4661:
URL: https://github.com/apache/hbase/pull/4661#discussion_r943293708


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java:
##########
@@ -1575,6 +1575,20 @@ public void deleteTable(TableName tableName) throws 
IOException {
     getAdmin().deleteTable(tableName);
   }
 
+  /**
+   * Drop an existing table
+   * @param tableName existing table
+   * @param archive   if archive the data when delete the table
+   */
+  public void deleteTable(TableName tableName, boolean archive) throws 
IOException {

Review Comment:
   Make the above method call this method so we can save some lines of code?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java:
##########
@@ -2431,11 +2431,35 @@ private static boolean isCatalogTable(final TableName 
tableName) {
     return tableName.equals(TableName.META_TABLE_NAME);
   }
 
+  private void checkSnapshot(TableName tableName, boolean archive) throws 
IOException {
+    /*
+     * If decide to delete the table without archive, need to make sure the 
table has no snapshot
+     * Meanwhile, the check will scan the snapshots which will do list and 
open, if there is lots of
+     * snapshot, the performance may be impacted, should evaluate the 
performance between directly
+     * archive and snapshot scan TODO: find some any way to get if the table 
snapshotted or not
+     */
+    if (!archive) {

Review Comment:
   Why we need this logic here? Mind exlaining a bit?



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

Reply via email to