Author: toad
Date: 2009-02-14 01:41:51 +0000 (Sat, 14 Feb 2009)
New Revision: 25641

Modified:
   
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
Log:
Don't shrink from small to big


Modified: 
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
   2009-02-14 01:41:18 UTC (rev 25640)
+++ 
branches/db4o/freenet/src/freenet/support/io/PersistentBlobTempBucketFactory.java
   2009-02-14 01:41:51 UTC (rev 25641)
@@ -438,6 +438,12 @@
                        // Must be 10% free at end
                        newBlocks = (long) ((lastBlock + 32) * 1.1);
                        newBlocks = Math.max(newBlocks, 32);
+                       if(newBlocks >= blocks) {
+                               if(logMINOR) Logger.minor(this, "Not shrinking, 
would shrink from "+blocks+" to "+newBlocks);
+                               lastCheckedEnd = now;
+                               queueMaybeShrink();
+                               return;
+                       }
                        System.err.println("Shrinking blob file from "+blocks+" 
to "+newBlocks);
                        for(long l = newBlocks; l <= blocks; l++) {
                                freeSlots.remove(l);

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to