deniskuzZ commented on code in PR #5997:
URL: https://github.com/apache/hive/pull/5997#discussion_r2297469398
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -3084,17 +3076,26 @@ private boolean drop_table_core(final RawStore ms,
final String catName, final S
this, isReplicated),
envContext);
}
+ if (tableDataShouldBeDeleted) {
+ // Data needs deletion. Check if trash may be skipped.
+ // Delete the data in the partitions which have other locations
+ deletePartitionData(partPaths, ifPurge,
ReplChangeManager.shouldEnableCm(db, tbl));
+ // Delete the data in the table
+ deleteTableData(tblPath, ifPurge,
ReplChangeManager.shouldEnableCm(db, tbl));
+ }
success = ms.commitTransaction();
}
+ } catch (Exception e) {
+ ms.rollbackTransaction();
+ LOG.error("Failed to drop table " + name + ", rolling back transaction",
e);
+ if (e instanceof MetaException) {
Review Comment:
I meant, why do we need to remap the exception to `MetaException`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]