Author: toad
Date: 2006-08-04 18:05:05 +0000 (Fri, 04 Aug 2006)
New Revision: 9888
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
more user friendly logging when shrinking stores.
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-08-04
17:52:26 UTC (rev 9887)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-08-04
18:05:05 UTC (rev 9888)
@@ -316,6 +316,13 @@
break;
}
x++;
+ if(x % 1024 == 0) {
+ System.out.println("Reading store prior
to shrink: "+(x*100/chkBlocksInStore)+ "% ( "+x+"/"+chkBlocksInStore+")");
+ }
+ if(x == Integer.MAX_VALUE) {
+ System.err.println("Key number "+x+" -
ignoring store after "+(x*(dataBlockSize+headerBlockSize)+" bytes"));
+ break;
+ }
}
} finally {
@@ -362,9 +369,11 @@
if((i+1) % 2048 == 0) {
t.commit();
t = environment.beginTransaction(null,null);
+ System.out.println("Moving blocks:
"+(i*100/wantedMove.size())+ "% ( "+i+"/"+wantedMove.size()+")");
}
- System.err.println("Moved "+wantedBlock+" to "+unwantedBlock);
+ //System.err.println("Moved "+wantedBlock+" to "+unwantedBlock);
}
+ System.out.println("Moved all "+wantedMove.size()+" blocks");
if(t != null) {
t.commit();
t = null;