2005-12-13 zzz
* Don't test tunnels expiring within 90 seconds * Defer Test Tunnel jobs if job lag too large * Use JobQueue.getMaxLag() rather than the jobQueue.jobLag stat to measure job lag for tunnel build backoff, allowing for more agile handling (since the stat is only updated once a minute) * Use tunnel length override if all tunnels are expiring within one minute.
This commit is contained in:
11
history.txt
11
history.txt
@ -1,4 +1,13 @@
|
|||||||
$Id: history.txt,v 1.352 2005/12/09 03:05:48 jrandom Exp $
|
$Id: history.txt,v 1.353 2005/12/13 04:38:52 jrandom Exp $
|
||||||
|
|
||||||
|
2005-12-13 zzz
|
||||||
|
* Don't test tunnels expiring within 90 seconds
|
||||||
|
* Defer Test Tunnel jobs if job lag too large
|
||||||
|
* Use JobQueue.getMaxLag() rather than the jobQueue.jobLag stat to measure
|
||||||
|
job lag for tunnel build backoff, allowing for more agile handling
|
||||||
|
(since the stat is only updated once a minute)
|
||||||
|
* Use tunnel length override if all tunnels are expiring within one
|
||||||
|
minute.
|
||||||
|
|
||||||
2005-12-13 jrandom
|
2005-12-13 jrandom
|
||||||
* Fixed I2PSnark's handling of some torrent files to deal with those
|
* Fixed I2PSnark's handling of some torrent files to deal with those
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.308 $ $Date: 2005/12/08 15:53:41 $";
|
public final static String ID = "$Revision: 1.309 $ $Date: 2005/12/09 03:05:48 $";
|
||||||
public final static String VERSION = "0.6.1.7";
|
public final static String VERSION = "0.6.1.7";
|
||||||
public final static long BUILD = 2;
|
public final static long BUILD = 3;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
@ -50,6 +50,14 @@ class TestJob extends JobImpl {
|
|||||||
}
|
}
|
||||||
public String getName() { return "Test tunnel"; }
|
public String getName() { return "Test tunnel"; }
|
||||||
public void runJob() {
|
public void runJob() {
|
||||||
|
long lag = getContext().jobQueue().getMaxLag();
|
||||||
|
if (lag > 3000) {
|
||||||
|
if (_log.shouldLog(Log.WARN))
|
||||||
|
_log.warn("Deferring test of " + _cfg + " due to job lag = " + lag);
|
||||||
|
getContext().statManager().addRateData("tunnel.testAborted", _cfg.getLength(), 0);
|
||||||
|
scheduleRetest();
|
||||||
|
return;
|
||||||
|
}
|
||||||
_found = false;
|
_found = false;
|
||||||
// note: testing with exploratory tunnels always, even if the tested tunnel
|
// note: testing with exploratory tunnels always, even if the tested tunnel
|
||||||
// is a client tunnel (per _cfg.getDestination())
|
// is a client tunnel (per _cfg.getDestination())
|
||||||
@ -166,7 +174,7 @@ class TestJob extends JobImpl {
|
|||||||
_outTunnel = null;
|
_outTunnel = null;
|
||||||
_replyTunnel = null;
|
_replyTunnel = null;
|
||||||
int delay = getDelay();
|
int delay = getDelay();
|
||||||
if (_cfg.getExpiration() > getContext().clock().now() + delay)
|
if (_cfg.getExpiration() > getContext().clock().now() + delay + (3 * getTestPeriod()) + 30*1000)
|
||||||
requeue(delay);
|
requeue(delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ public class TunnelPool {
|
|||||||
if (maxBuild > 0 && build > maxBuild)
|
if (maxBuild > 0 && build > maxBuild)
|
||||||
build = maxBuild;
|
build = maxBuild;
|
||||||
int buildThrottle = MAX_BUILDS_PER_MINUTE;
|
int buildThrottle = MAX_BUILDS_PER_MINUTE;
|
||||||
int lag = (int) _context.statManager().getRate("jobQueue.jobLag").getRate(60*1000).getAverageValue();
|
long lag = _context.jobQueue().getMaxLag();
|
||||||
int netErrors = (int) _context.statManager().getRate("udp.sendException").getRate(60*1000).getLastEventCount();
|
int netErrors = (int) _context.statManager().getRate("udp.sendException").getRate(60*1000).getLastEventCount();
|
||||||
if (lag > 3 * 1000 || netErrors > 5) {
|
if (lag > 3 * 1000 || netErrors > 5) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
@ -161,7 +161,8 @@ public class TunnelPool {
|
|||||||
if (build <= 0) return 0;
|
if (build <= 0) return 0;
|
||||||
|
|
||||||
if ((_settings.isExploratory() && baseTarget > countUsableTunnels(1)) ||
|
if ((_settings.isExploratory() && baseTarget > countUsableTunnels(1)) ||
|
||||||
((!_settings.isExploratory()) && baseTarget > countUsableTunnels(0)))
|
((!_settings.isExploratory()) && baseTarget > countUsableTunnels(0)) ||
|
||||||
|
((!_settings.isExploratory()) && countUsableTunnels(1) == 0))
|
||||||
_settings.setLengthOverride(1);
|
_settings.setLengthOverride(1);
|
||||||
else
|
else
|
||||||
_settings.setLengthOverride(0);
|
_settings.setLengthOverride(0);
|
||||||
@ -540,7 +541,7 @@ public class TunnelPool {
|
|||||||
else
|
else
|
||||||
added = refreshBuilders(0, 1);
|
added = refreshBuilders(0, 1);
|
||||||
if ( (added > 0) && (_log.shouldLog(Log.WARN)) )
|
if ( (added > 0) && (_log.shouldLog(Log.WARN)) )
|
||||||
_log.warn("Additional parallel rebuilding of tunnel for " + TunnelPool.this.toString());
|
_log.warn(added + " additional parallel rebuild(s) for " + TunnelPool.this.toString());
|
||||||
requeue(30*1000);
|
requeue(30*1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user