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
|
2006-05-01 jrandom
|
||||||
* Fix for a netDb lookup race (thanks cervantes!)
|
* Fix for a netDb lookup race (thanks cervantes!)
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
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 String VERSION = "0.6.1.17";
|
||||||
public final static long BUILD = 3;
|
public final static long BUILD = 4;
|
||||||
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);
|
||||||
|
@ -576,9 +576,9 @@ public class EstablishmentManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_transport.send(_builder.buildSessionCreatedPacket(state, _transport.getExternalPort(), _transport.getIntroKey()));
|
_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
|
// repeat
|
||||||
state.setNextSendTime(now + 5*1000);
|
state.setNextSendTime(now + 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendRequest(OutboundEstablishState state) {
|
private void sendRequest(OutboundEstablishState state) {
|
||||||
@ -988,15 +988,15 @@ public class EstablishmentManager {
|
|||||||
|
|
||||||
long delay = nextSendTime - now;
|
long delay = nextSendTime - now;
|
||||||
if ( (nextSendTime == -1) || (delay > 0) ) {
|
if ( (nextSendTime == -1) || (delay > 0) ) {
|
||||||
if (delay > 5000)
|
if (delay > 1000)
|
||||||
delay = 5000;
|
delay = 1000;
|
||||||
boolean interrupted = false;
|
boolean interrupted = false;
|
||||||
try {
|
try {
|
||||||
synchronized (_activityLock) {
|
synchronized (_activityLock) {
|
||||||
if (_activity > 0)
|
if (_activity > 0)
|
||||||
return;
|
return;
|
||||||
if (nextSendTime == -1)
|
if (nextSendTime == -1)
|
||||||
_activityLock.wait(5000);
|
_activityLock.wait(1000);
|
||||||
else
|
else
|
||||||
_activityLock.wait(delay);
|
_activityLock.wait(delay);
|
||||||
}
|
}
|
||||||
|
@ -360,9 +360,9 @@ public class OutboundEstablishState {
|
|||||||
/** note that we just sent the SessionConfirmed packet */
|
/** note that we just sent the SessionConfirmed packet */
|
||||||
public synchronized void confirmedPacketsSent() {
|
public synchronized void confirmedPacketsSent() {
|
||||||
_lastSend = _context.clock().now();
|
_lastSend = _context.clock().now();
|
||||||
_nextSend = _lastSend + 5*1000;
|
_nextSend = _lastSend + 1000;
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("Send confirm packets, nextSend = 5s");
|
_log.debug("Send confirm packets, nextSend = 1s");
|
||||||
if ( (_currentState == STATE_UNKNOWN) ||
|
if ( (_currentState == STATE_UNKNOWN) ||
|
||||||
(_currentState == STATE_REQUEST_SENT) ||
|
(_currentState == STATE_REQUEST_SENT) ||
|
||||||
(_currentState == STATE_CREATED_RECEIVED) )
|
(_currentState == STATE_CREATED_RECEIVED) )
|
||||||
@ -371,15 +371,15 @@ public class OutboundEstablishState {
|
|||||||
/** note that we just sent the SessionRequest packet */
|
/** note that we just sent the SessionRequest packet */
|
||||||
public synchronized void requestSent() {
|
public synchronized void requestSent() {
|
||||||
_lastSend = _context.clock().now();
|
_lastSend = _context.clock().now();
|
||||||
_nextSend = _lastSend + 5*1000;
|
_nextSend = _lastSend + 1000;
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
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)
|
if (_currentState == STATE_UNKNOWN)
|
||||||
_currentState = STATE_REQUEST_SENT;
|
_currentState = STATE_REQUEST_SENT;
|
||||||
}
|
}
|
||||||
public synchronized void introSent() {
|
public synchronized void introSent() {
|
||||||
_lastSend = _context.clock().now();
|
_lastSend = _context.clock().now();
|
||||||
_nextSend = _lastSend + 5*1000;
|
_nextSend = _lastSend + 1000;
|
||||||
if (_currentState == STATE_UNKNOWN)
|
if (_currentState == STATE_UNKNOWN)
|
||||||
_currentState = STATE_PENDING_INTRO;
|
_currentState = STATE_PENDING_INTRO;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public class TunnelDispatcher implements Service {
|
|||||||
new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
|
new long[] { 60*1000l, 60*60*1000l, 24*60*60*1000l });
|
||||||
ctx.statManager().createRateStat("tunnel.participatingMessageCount",
|
ctx.statManager().createRateStat("tunnel.participatingMessageCount",
|
||||||
"How many messages are sent through a participating tunnel?", "Tunnels",
|
"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",
|
ctx.statManager().createRateStat("tunnel.ownedMessageCount",
|
||||||
"How many messages are sent through a tunnel we created (period == failures)?", "Tunnels",
|
"How many messages are sent through a tunnel we created (period == failures)?", "Tunnels",
|
||||||
new long[] { 60*1000l, 10*60*1000l, 60*60*1000l });
|
new long[] { 60*1000l, 10*60*1000l, 60*60*1000l });
|
||||||
|
@ -22,7 +22,7 @@ class BuildRequestor {
|
|||||||
ORDER.add(new Integer(i));
|
ORDER.add(new Integer(i));
|
||||||
}
|
}
|
||||||
private static final int PRIORITY = 500;
|
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) {
|
private static boolean usePairedTunnels(RouterContext ctx) {
|
||||||
String val = ctx.getProperty("router.usePairedTunnels");
|
String val = ctx.getProperty("router.usePairedTunnels");
|
||||||
|
@ -55,7 +55,7 @@ class ExploratoryPeerSelector extends TunnelPeerSelector {
|
|||||||
if (Boolean.valueOf(ctx.getProperty("router.exploreHighCapacity", "false")).booleanValue())
|
if (Boolean.valueOf(ctx.getProperty("router.exploreHighCapacity", "false")).booleanValue())
|
||||||
return true;
|
return true;
|
||||||
// no need to explore too wildly at first
|
// no need to explore too wildly at first
|
||||||
if (ctx.router().getUptime() <= 10*1000)
|
if (ctx.router().getUptime() <= 5*60*1000)
|
||||||
return true;
|
return true;
|
||||||
// ok, if we aren't explicitly asking for it, we should try to pick peers
|
// 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
|
// 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 */
|
/** randomized time we should wait before testing */
|
||||||
private int getDelay() { return TEST_DELAY + getContext().random().nextInt(TEST_DELAY); }
|
private int getDelay() { return TEST_DELAY + getContext().random().nextInt(TEST_DELAY); }
|
||||||
/** how long we allow tests to run for before failing them */
|
/** 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() { scheduleRetest(false); }
|
||||||
private void scheduleRetest(boolean asap) {
|
private void scheduleRetest(boolean asap) {
|
||||||
if (asap) {
|
if (asap) {
|
||||||
|
Reference in New Issue
Block a user