directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1595455 - in /directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree: PersistedBTree.java RecordManager.java
Date Sat, 17 May 2014 12:32:18 GMT
Author: elecharny
Date: Sat May 17 12:32:17 2014
New Revision: 1595455

URL: http://svn.apache.org/r1595455
Log:
Set the BOB and CPB btrees' cache default size to 1000. That solves the OOM error we get when
we inject a lot of elements, as the Cache was unlimited. 

Modified:
    directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
    directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java

Modified: directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java?rev=1595455&r1=1595454&r2=1595455&view=diff
==============================================================================
--- directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
(original)
+++ directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
Sat May 17 12:32:17 2014
@@ -54,7 +54,7 @@ public class PersistedBTree<K, V> extend
     protected Cache cache;
 
     /** The default number of pages to keep in memory */
-    static final int DEFAULT_CACHE_SIZE = 1000;
+    public static final int DEFAULT_CACHE_SIZE = 1000;
 
     /** The cache size, default to 1000 elements */
     protected int cacheSize = DEFAULT_CACHE_SIZE;

Modified: directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java?rev=1595455&r1=1595454&r2=1595455&view=diff
==============================================================================
--- directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
(original)
+++ directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
Sat May 17 12:32:17 2014
@@ -396,6 +396,7 @@ public class RecordManager extends Abstr
         configuration.setName( BTREE_OF_BTREES_NAME );
         configuration.setValueSerializer( LongSerializer.INSTANCE );
         configuration.setBtreeType( BTreeTypeEnum.BTREE_OF_BTREES );
+        configuration.setCacheSize( PersistedBTree.DEFAULT_CACHE_SIZE );
 
         btreeOfBtrees = BTreeFactory.createPersistedBTree( configuration );
     }
@@ -411,6 +412,7 @@ public class RecordManager extends Abstr
         configuration.setName( COPIED_PAGE_BTREE_NAME );
         configuration.setValueSerializer( LongArraySerializer.INSTANCE );
         configuration.setBtreeType( BTreeTypeEnum.COPIED_PAGES_BTREE );
+        configuration.setCacheSize( PersistedBTree.DEFAULT_CACHE_SIZE );
 
         copiedPageBtree = BTreeFactory.createPersistedBTree( configuration );
     }
@@ -1933,7 +1935,7 @@ public class RecordManager extends Abstr
 
         btreeOfBtrees.insert( nameRevision, btreeHeaderOffset );
 
-        // Update the B-tree of B-trees
+        // Update the B-tree of B-trees offset
         currentBtreeOfBtreesOffset = getBTreeHeader( BTREE_OF_BTREES_NAME ).getBTreeHeaderOffset();
     }
 



Mime
View raw message