Author: toad
Date: 2008-02-13 21:56:34 +0000 (Wed, 13 Feb 2008)
New Revision: 17879
Modified:
trunk/freenet/src/freenet/node/LocationManager.java
Log:
Fix unreasonably high averageSwapTime caused by not updated lockedTime in
lockOrQueue() and even in unlock() if we don't unlock but in fact use the next
one.
Modified: trunk/freenet/src/freenet/node/LocationManager.java
===================================================================
--- trunk/freenet/src/freenet/node/LocationManager.java 2008-02-13 21:33:33 UTC
(rev 17878)
+++ trunk/freenet/src/freenet/node/LocationManager.java 2008-02-13 21:56:34 UTC
(rev 17879)
@@ -629,6 +629,7 @@
// Otherwise, stay locked, and start the next one from the queue.
nextMessage = (Message) incomingMessageQueue.removeFirst();
+ lockedTime = System.currentTimeMillis();
}
@@ -900,6 +901,7 @@
if(!locked) {
locked = true;
runNow = true;
+ lockedTime = System.currentTimeMillis();
} else {
// Locked.
if((!node.enableSwapQueueing) ||