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.
This commit is contained in:
@ -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!)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 });
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user