hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1640250 - /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
Date Mon, 17 Nov 2014 22:45:13 GMT
Author: brock
Date: Mon Nov 17 22:45:12 2014
New Revision: 1640250

URL: http://svn.apache.org/r1640250
Log:
HIVE-8891 - Another possible cause to NucleusObjectNotFoundException from drops/rollback (Chaoyu
Tang via Brock)

Modified:
    hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java?rev=1640250&r1=1640249&r2=1640250&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java Mon Nov
17 22:45:12 2014
@@ -466,12 +466,15 @@ public class ObjectStore implements RawS
     if (currentTransaction.isActive()
         && transactionStatus != TXN_STATUS.ROLLBACK) {
       transactionStatus = TXN_STATUS.ROLLBACK;
-      // could already be rolled back
-      currentTransaction.rollback();
-      // remove all detached objects from the cache, since the transaction is
-      // being rolled back they are no longer relevant, and this prevents them
-      // from reattaching in future transactions
-      pm.evictAll();
+      try {
+        // could already be rolled back
+        currentTransaction.rollback();
+      } finally {
+        // remove all detached objects from the cache, since the transaction is
+        // being rolled back they are no longer relevant, and this prevents them
+        // from reattaching in future transactions
+        pm.evictAll();
+      }
     }
   }
 



Mime
View raw message