directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1622224 - /directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotTable.java
Date Wed, 03 Sep 2014 11:23:01 GMT
Author: kayyagari
Date: Wed Sep  3 11:23:01 2014
New Revision: 1622224

URL: http://svn.apache.org/r1622224
Log:
closed cursors

Modified:
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotTable.java

Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotTable.java?rev=1622224&r1=1622223&r2=1622224&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotTable.java
(original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotTable.java
Wed Sep  3 11:23:01 2014
@@ -373,6 +373,8 @@ public class MavibotTable<K, V> extends 
             if ( bt.isAllowDuplicates() )
             {
                 ValueCursor<V> valueCursor = bt.getValues( key );
+                int size = valueCursor.size();
+                valueCursor.close();
                 org.apache.directory.mavibot.btree.Tuple<K, V> returned = bt.delete(
key );
 
                 if ( null == returned )
@@ -380,7 +382,7 @@ public class MavibotTable<K, V> extends 
                     return;
                 }
 
-                count -= valueCursor.size();
+                count -= size;
             }
             else
             {
@@ -535,8 +537,10 @@ public class MavibotTable<K, V> extends 
             try
             {
                 ValueCursor<V> dupHolder = bt.getValues( key );
-
-                return dupHolder.size();
+                int size = dupHolder.size();
+                dupHolder.close();
+                
+                return size;
             }
             catch ( KeyNotFoundException knfe )
             {



Mime
View raw message