You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2012/12/22 07:30:35 UTC
svn commit: r1425247 -
/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
Author: namit
Date: Sat Dec 22 06:30:35 2012
New Revision: 1425247
URL: http://svn.apache.org/viewvc?rev=1425247&view=rev
Log:
HIVE-3826 Rollbacks and retries of drops cause
org.datanucleus.exceptions.NucleusObjectNotFoundException: No such database row)
(Kevin Wilfong via namit)
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=1425247&r1=1425246&r2=1425247&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 Sat Dec 22 06:30:35 2012
@@ -371,6 +371,10 @@ public class ObjectStore implements RawS
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();
}
}