dengzhhu653 commented on code in PR #5851:
URL: https://github.com/apache/hive/pull/5851#discussion_r2663644785
##########
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:
in async mode, the client still need to ping the server for the operation
status until the end, the client needs to know whether the request is a failure
or not.
The main reason is the TUGIBasedProcessor/TUGIAssumingProcessor might close
the shared FileSystem behind, causing the "java.io.IOException: Filesystem
closed" for the handler running in background.
Still we need to address this "Filesystem closed" issue, as we don't know
whether there are Filesystem operations in the listeners.
--
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]