directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1546544 - in /directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot: MavibotCursor.java MavibotMasterTable.java MavibotTable.java
Date Fri, 29 Nov 2013 11:20:51 GMT
Author: elecharny
Date: Fri Nov 29 11:20:51 2013
New Revision: 1546544

URL: http://svn.apache.org/r1546544
Log:
o Fixed some wrong cursor move to nextKey() instead of next()
o Don't close the recordManager while closing the MavibotMasterTable
o Insert the value even if it already exists into the btree because the value might exist
but it might be different even if it's seen as equal.

Modified:
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotCursor.java
    directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java
    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/MavibotCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotCursor.java?rev=1546544&r1=1546543&r2=1546544&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotCursor.java
(original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotCursor.java
Fri Nov 29 11:20:51 2013
@@ -133,9 +133,9 @@ class MavibotCursor<K, V> extends Abstra
             }
             else
             {
-                if ( browser.hasNext() )
+                if ( browser.hasNextKey() )
                 {
-                    browser.next();
+                    browser.nextKey();
                 }
                 else
                 {

Modified: directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java?rev=1546544&r1=1546543&r2=1546544&view=diff
==============================================================================
--- directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java
(original)
+++ directory/apacheds/trunk/mavibot-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/mavibot/MavibotMasterTable.java
Fri Nov 29 11:20:51 2013
@@ -60,7 +60,7 @@ public class MavibotMasterTable extends 
     @Override
     public void close() throws Exception
     {
-        recordMan.close();
+        // do nothing here, the RecordManager will be closed in MavibotMasterTable.close()
     }
 
 }

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=1546544&r1=1546543&r2=1546544&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
Fri Nov 29 11:20:51 2013
@@ -328,10 +328,11 @@ public class MavibotTable<K, V> extends 
 
             if ( !bt.contains( key, value ) )
             {
-                bt.insert( key, value );
-    
                 count++;
             }
+            
+            // Always insert the entry. If it already exists, it will replace the previous
entry
+            bt.insert( key, value );
         }
         catch ( Exception e )
         {



Mime
View raw message