zxl-333 commented on code in PR #5997: URL: https://github.com/apache/hive/pull/5997#discussion_r2280866457
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java: ########## @@ -3050,18 +3050,6 @@ private boolean drop_table_core(final RawStore ms, final String catName, final S firePreEvent(new PreDropTableEvent(tbl, deleteData, this)); tableDataShouldBeDeleted = checkTableDataShouldBeDeleted(tbl, deleteData); - if (tableDataShouldBeDeleted && tbl.getSd().getLocation() != null) { Review Comment: @saihemanth-cloudera @deniskuzZ Do not use ranger. Refer to the steps in HIVE-18888. When using ranger, even if ranger has been authorized, it may still result in the failure of the ACL write permission verification in HDFS, preventing the deletion of the table. specific steps are as follows: 1、User_a has only read access rights for the test database and the following table (hdfs). /usr/warhouse/hive/test.db 2、However, now the read and write permissions for the 'test' db and its tables have been granted through the 'ranger' authorization. 3. If 'user_a' attempts to delete the 'test_1' table within the 'test' library, the following exception will be thrown. test_1 metadata not deleted since hdfs://nn//usr/warhouse/hive/test.db is not writable by user_a Therefore, regardless of whether the ranger permission check is enabled or not, in order to ensure that users do not have read or write permissions for the database tables, the operation must fail and the metadata database transaction must be rolled back. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org