wecharyu commented on code in PR #5780:
URL: https://github.com/apache/hive/pull/5780#discussion_r2084999446


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -1299,7 +1297,9 @@ private void create_database_core(RawStore ms, final 
Database db)
       success = ms.commitTransaction();
     } finally {
       if (!success) {
-        ms.rollbackTransaction();
+        if (openTransaction) {

Review Comment:
   In `create_database_core` it may throw exception before calling 
`openTransaction()`, so it may not need call `rollbackTransaction()` in finally 
block.



-- 
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

Reply via email to