[freenet-cvs] r12044 - trunk/freenet/src/freenet/store

toad at freenetproject.org toad at freenetproject.org
Thu Mar 8 21:22:58 UTC 2007


Author: toad
Date: 2007-03-08 21:22:57 +0000 (Thu, 08 Mar 2007)
New Revision: 12044

Modified:
   trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
No idea why it's hanging after realising there are no blocks to move ...

Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java	2007-03-08 20:04:59 UTC (rev 12043)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java	2007-03-08 21:22:57 UTC (rev 12044)
@@ -875,6 +875,8 @@
     	}
     	
     	maybeQuickShrink(false, true);
+    	
+    	System.err.println("Shrunk store, now have "+chkBlocksInStore+" of "+maxChkBlocks);
 	}
 	
 	private void maybeQuickShrink(boolean dontCheck, boolean dontCheckForHoles) throws DatabaseException, IOException {
@@ -886,8 +888,10 @@
 			synchronized(this) {
 				maxBlocks = maxChkBlocks;
 				curBlocks = chkBlocksInStore;
-				if(maxBlocks >= curBlocks)
+				if(maxBlocks >= curBlocks) {
+					System.out.println("Not shrinking store: "+curBlocks+" < "+maxBlocks);
 					return;
+				}
 			}
 			System.err.println("Shrinking store: "+curBlocks+" -> "+maxBlocks+" (from db "+countCHKBlocksFromDatabase()+" from file "+countCHKBlocksFromFile()+ ')');
 			Logger.error(this, "Shrinking store: "+curBlocks+" -> "+maxBlocks+" (from db "+countCHKBlocksFromDatabase()+" from file "+countCHKBlocksFromFile()+ ')');




More information about the cvs mailing list