You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2013/12/17 09:48:16 UTC
svn commit: r1551487 -
/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
Author: elecharny
Date: Tue Dec 17 08:48:16 2013
New Revision: 1551487
URL: http://svn.apache.org/r1551487
Log:
Was a bit too aggressive when cleaning the cache... It has to be alive to remove all.
Modified:
directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java?rev=1551487&r1=1551486&r2=1551487&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java (original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedBTree.java Tue Dec 17 08:48:16 2013
@@ -28,6 +28,7 @@ import java.util.concurrent.ConcurrentLi
import java.util.concurrent.locks.ReentrantLock;
import net.sf.ehcache.Cache;
+import net.sf.ehcache.Status;
import net.sf.ehcache.config.CacheConfiguration;
import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
@@ -305,7 +306,11 @@ public class PersistedBTree<K, V> extend
// readTransactions.clear();
// Clean the cache
- cache.removeAll();
+ if ( cache.getStatus() == Status.STATUS_ALIVE )
+ {
+ cache.removeAll();
+ }
+
cache.dispose();
rootPage = null;