diff --git a/history.txt b/history.txt index 318aedcd0..0b6f659fc 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,11 @@ -$Id: history.txt,v 1.464 2006/04/27 19:31:21 jrandom Exp $ +$Id: history.txt,v 1.465 2006/05/01 14:09:02 jrandom Exp $ + +2006-05-01 jrandom + * Adjust the tunnel build timeouts to cut down on expirations, and + increased the SSU connection establishment retransmission rate to + something less glacial. + * For the first 5 minutes of uptime, be less aggressive with tunnel + exploration, opting for more reliable peers to start with. 2006-05-01 jrandom * Fix for a netDb lookup race (thanks cervantes!) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 9cb21f69e..45abfd2c8 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.404 $ $Date: 2006/04/27 19:31:21 $"; + public final static String ID = "$Revision: 1.405 $ $Date: 2006/05/01 14:09:02 $"; public final static String VERSION = "0.6.1.17"; - public final static long BUILD = 3; + public final static long BUILD = 4; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java b/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java index 119fb1905..1adaaad45 100644 --- a/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java +++ b/router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java @@ -576,9 +576,9 @@ public class EstablishmentManager { return; } _transport.send(_builder.buildSessionCreatedPacket(state, _transport.getExternalPort(), _transport.getIntroKey())); - // if they haven't advanced to sending us confirmed packets in 5s, + // if they haven't advanced to sending us confirmed packets in 1s, // repeat - state.setNextSendTime(now + 5*1000); + state.setNextSendTime(now + 1000); } private void sendRequest(OutboundEstablishState state) { @@ -988,15 +988,15 @@ public class EstablishmentManager { long delay = nextSendTime - now; if ( (nextSendTime == -1) || (delay > 0) ) { - if (delay > 5000) - delay = 5000; + if (delay > 1000) + delay = 1000; boolean interrupted = false; try { synchronized (_activityLock) { if (_activity > 0) return; if (nextSendTime == -1) - _activityLock.wait(5000); + _activityLock.wait(1000); else _activityLock.wait(delay); } diff --git a/router/java/src/net/i2p/router/transport/udp/OutboundEstablishState.java b/router/java/src/net/i2p/router/transport/udp/OutboundEstablishState.java index 0d9517086..a7649bfb8 100644 --- a/router/java/src/net/i2p/router/transport/udp/OutboundEstablishState.java +++ b/router/java/src/net/i2p/router/transport/udp/OutboundEstablishState.java @@ -360,9 +360,9 @@ public class OutboundEstablishState { /** note that we just sent the SessionConfirmed packet */ public synchronized void confirmedPacketsSent() { _lastSend = _context.clock().now(); - _nextSend = _lastSend + 5*1000; + _nextSend = _lastSend + 1000; if (_log.shouldLog(Log.DEBUG)) - _log.debug("Send confirm packets, nextSend = 5s"); + _log.debug("Send confirm packets, nextSend = 1s"); if ( (_currentState == STATE_UNKNOWN) || (_currentState == STATE_REQUEST_SENT) || (_currentState == STATE_CREATED_RECEIVED) ) @@ -371,15 +371,15 @@ public class OutboundEstablishState { /** note that we just sent the SessionRequest packet */ public synchronized void requestSent() { _lastSend = _context.clock().now(); - _nextSend = _lastSend + 5*1000; + _nextSend = _lastSend + 1000; if (_log.shouldLog(Log.DEBUG)) - _log.debug("Send a request packet, nextSend = 5s"); + _log.debug("Send a request packet, nextSend = 1s"); if (_currentState == STATE_UNKNOWN) _currentState = STATE_REQUEST_SENT; } public synchronized void introSent() { _lastSend = _context.clock().now(); - _nextSend = _lastSend + 5*1000; + _nextSend = _lastSend + 1000; if (_currentState == STATE_UNKNOWN) _currentState = STATE_PENDING_INTRO; } diff --git a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java index 8f587c5e6..51662b536 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java @@ -104,7 +104,7 @@ public class TunnelDispatcher implements Service { new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l }); ctx.statManager().createRateStat("tunnel.participatingMessageCount", "How many messages are sent through a participating tunnel?", "Tunnels", - new long[] { 60*10*1000l, 60*60*1000l, 24*60*60*1000l }); + new long[] { 60*1000l, 60*10*1000l, 60*60*1000l, 24*60*60*1000l }); ctx.statManager().createRateStat("tunnel.ownedMessageCount", "How many messages are sent through a tunnel we created (period == failures)?", "Tunnels", new long[] { 60*1000l, 10*60*1000l, 60*60*1000l }); diff --git a/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java b/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java index e45449ee9..a013b7a39 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java +++ b/router/java/src/net/i2p/router/tunnel/pool/BuildRequestor.java @@ -22,7 +22,7 @@ class BuildRequestor { ORDER.add(new Integer(i)); } private static final int PRIORITY = 500; - static final int REQUEST_TIMEOUT = 20*1000; + static final int REQUEST_TIMEOUT = 30*1000; private static boolean usePairedTunnels(RouterContext ctx) { String val = ctx.getProperty("router.usePairedTunnels"); diff --git a/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java b/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java index 23b65a7ca..3a8bcfd13 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java +++ b/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java @@ -55,7 +55,7 @@ class ExploratoryPeerSelector extends TunnelPeerSelector { if (Boolean.valueOf(ctx.getProperty("router.exploreHighCapacity", "false")).booleanValue()) return true; // no need to explore too wildly at first - if (ctx.router().getUptime() <= 10*1000) + if (ctx.router().getUptime() <= 5*60*1000) return true; // ok, if we aren't explicitly asking for it, we should try to pick peers // randomly from the 'not failing' pool. However, if we are having a diff --git a/router/java/src/net/i2p/router/tunnel/pool/TestJob.java b/router/java/src/net/i2p/router/tunnel/pool/TestJob.java index 4c760d337..55080c269 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/TestJob.java +++ b/router/java/src/net/i2p/router/tunnel/pool/TestJob.java @@ -191,7 +191,7 @@ class TestJob extends JobImpl { /** randomized time we should wait before testing */ private int getDelay() { return TEST_DELAY + getContext().random().nextInt(TEST_DELAY); } /** how long we allow tests to run for before failing them */ - private int getTestPeriod() { return 20*1000; } + private int getTestPeriod() { return 15*1000; } private void scheduleRetest() { scheduleRetest(false); } private void scheduleRetest(boolean asap) { if (asap) {