alexdongli0829 commented on code in PR #4661:
URL: https://github.com/apache/hbase/pull/4661#discussion_r952048929
##########
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:
@Apache9 You are correct, there was some compromise for the performance and
accuracy. If need to scan all the snapshot files and find out if the hfile
referred, there will be another performance impact, meanwhile, for the snapshot
which is happening, we may need a get the lock from the snapshot manager to
make sure no in processing snapshot referring the file, its another concern.
So current I just simplify the logic and return the message to end user and
let user decide if they want to remove the snapshot and then delete the table
without archive. Do you think its acceptable? Or we had better check the
details with some performance sacrifice?
--
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]