You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2013/04/10 17:37:25 UTC
svn commit: r1466522 -
/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Author: rhillegas
Date: Wed Apr 10 15:37:25 2013
New Revision: 1466522
URL: http://svn.apache.org/r1466522
Log:
DERBY-6137: Cleanup cache manager usage by SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=1466522&r1=1466521&r2=1466522&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java Wed Apr 10 15:37:25 2013
@@ -10505,7 +10505,19 @@ public final class DataDictionaryImpl
( schemaName + "." + sequenceName) );
}
- return ((SequenceUpdater) sequenceGeneratorCache.find( uuid )).peekAtCurrentValue();
+ SequenceUpdater sequenceUpdater = null;
+
+ try {
+ sequenceUpdater = (SequenceUpdater) sequenceGeneratorCache.find( uuid );
+ return sequenceUpdater.peekAtCurrentValue();
+ }
+ finally
+ {
+ if ( sequenceUpdater != null )
+ {
+ sequenceGeneratorCache.release( sequenceUpdater );
+ }
+ }
}
public RowLocation getRowLocationTemplate(LanguageConnectionContext lcc,