You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/13 15:08:00 UTC

[jira] [Work logged] (HIVE-25111) Metastore Catalog Methods JDO Persistence

     [ https://issues.apache.org/jira/browse/HIVE-25111?focusedWorklogId=596185&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-596185 ]

ASF GitHub Bot logged work on HIVE-25111:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/May/21 15:07
            Start Date: 13/May/21 15:07
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on a change in pull request #2269:
URL: https://github.com/apache/hive/pull/2269#discussion_r631882813



##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
##########
@@ -642,112 +642,140 @@ public void rollbackTransaction() {
   @Override
   public void createCatalog(Catalog cat) throws MetaException {
     LOG.debug("Creating catalog {}", cat);
-    boolean committed = false;
+
     MCatalog mCat = catToMCat(cat);
+
+    final Transaction tx = pm.currentTransaction();
+
     try {
-      openTransaction();
+      tx.begin();
       pm.makePersistent(mCat);
-      committed = commitTransaction();
+      tx.commit();
     } finally {
-      if (!committed) {
-        rollbackTransaction();
+      if (tx.isActive()) {
+        tx.rollback();
       }
     }
   }
 
   @Override
   public void alterCatalog(String catName, Catalog cat)
-      throws MetaException, InvalidOperationException {
+      throws MetaException, InvalidOperationException, NoSuchObjectException {

Review comment:
       This should also throw NoSuchObjectException if user is attempting to alter a non-existing catalog




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 596185)
    Time Spent: 20m  (was: 10m)

> Metastore Catalog Methods JDO Persistence
> -----------------------------------------
>
>                 Key: HIVE-25111
>                 URL: https://issues.apache.org/jira/browse/HIVE-25111
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)