Author: j16sdiz
Date: 2008-07-11 12:45:56 +0000 (Fri, 11 Jul 2008)
New Revision: 21051

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
Log:
flush bloom filter less often

Modified: 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   2008-07-11 12:45:38 UTC (rev 21050)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   2008-07-11 12:45:56 UTC (rev 21051)
@@ -887,7 +887,10 @@
                                Thread.sleep((int)(CLEANER_PERIOD / 2 + 
CLEANER_PERIOD * Math.random()));
                        } catch (InterruptedException e){}

+                       int loop = 0;
                        while (!shutdown) {
+                               loop++;
+
                                cleanerLock.lock();
                                try {
                                        long _prevStoreSize;
@@ -922,7 +925,7 @@
                                        }

                                        try {
-                                               if (bloomFilter != null)
+                                               if (bloomFilter != null && loop 
% 6 == 0)
                                                        bloomFilter.force();
                                        } catch (Exception e) { // may throw 
IOException (even if it is not defined)
                                                Logger.error(this, "Can't force 
bloom filter", e);


Reply via email to