dengzhhu653 commented on code in PR #5851:
URL: https://github.com/apache/hive/pull/5851#discussion_r2666888942
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -1865,18 +1592,65 @@ public void drop_database_req(final DropDatabaseRequest
req)
throw new MetaException("Can not drop " + DEFAULT_DATABASE_NAME + "
database in catalog "
+ DEFAULT_CATALOG_NAME);
}
- boolean success = false;
+
Exception ex = null;
try {
- drop_database_core(getMS(), req);
- success = true;
+ AbstractOperationHandler<DropDatabaseRequest,
DropDatabaseHandler.DropDatabaseResult> dropDatabaseOp =
+ AbstractOperationHandler.offer(this, req);
+ AbstractOperationHandler.OperationStatus status =
dropDatabaseOp.getOperationStatus();
+ if (status.isFinished() && dropDatabaseOp.getResult() != null &&
dropDatabaseOp.getResult().isSuccess()) {
+ DropDatabaseHandler.DropDatabaseResult result =
dropDatabaseOp.getResult();
+ for (Path funcCmPath : result.getFunctionCmPaths()) {
+ wh.addToChangeManagement(funcCmPath);
+ }
+ if (req.isDeleteData()) {
+ // Moving the data deletion out of the async handler.
Review Comment:
nice catch, we should take the client crash into the picture
--
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]