Author: toad
Date: 2006-11-15 13:48:29 +0000 (Wed, 15 Nov 2006)
New Revision: 10924
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
Tweak the timeouts.
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-11-14
23:16:27 UTC (rev 10923)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2006-11-15
13:48:29 UTC (rev 10924)
@@ -561,6 +561,7 @@
private long checkForHoles(long blocksInFile, boolean dontTruncate)
throws DatabaseException {
System.err.println("Checking for holes in database...");
+ WrapperManager.signalStarting((int)blocksInFile*100); // 10/sec
long holes = 0;
long maxPresent = 0;
freeBlocks.clear();
@@ -630,7 +631,7 @@
checkForHoles(maxChkBlocks, true);
- WrapperManager.signalStarting(24*60*60*1000);
+ WrapperManager.signalStarting((int)chkBlocksInStore * 100); // 10 per
second
long realSize = countCHKBlocksFromFile();
@@ -742,6 +743,8 @@
// Now move all the wantedMove blocks onto the corresponding
unwantedMove's.
+ WrapperManager.signalStarting(wantedMoveNums.length*1000); // 1 per
second
+
byte[] buf = new byte[headerBlockSize + dataBlockSize];
t = null;
try {
@@ -859,6 +862,7 @@
}
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()+")");
+
WrapperManager.signalStarting((int)Math.min(0,(curBlocks-maxBlocks)*100)+5*60*1000);
// 10 per second plus 5 minutes
while(true) {
t = environment.beginTransaction(null,null);
long deleted = 0;