forked from I2P_Developers/i2p.i2p
shorten netdb expiration again
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2011-09-04 zzz
|
2011-09-04 zzz
|
||||||
* NetDB: Try again to fix ISJ deadlock, thx devzero
|
* NetDB:
|
||||||
|
- Try again to fix ISJ deadlock, thx devzero
|
||||||
|
- Lower RI expiration again
|
||||||
|
- Expire RIs with SSU only and no introducers sooner
|
||||||
* Transport: Remove one global lock in OutboundMessageRegistry.
|
* Transport: Remove one global lock in OutboundMessageRegistry.
|
||||||
|
|
||||||
2011-09-03 zzz
|
2011-09-03 zzz
|
||||||
|
@@ -121,9 +121,9 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
|||||||
* limits for accepting a dbDtore of a router (unless we dont
|
* limits for accepting a dbDtore of a router (unless we dont
|
||||||
* know anyone or just started up) -- see validate() below
|
* know anyone or just started up) -- see validate() below
|
||||||
*/
|
*/
|
||||||
private final static long ROUTER_INFO_EXPIRATION = 3*24*60*60*1000l;
|
private final static long ROUTER_INFO_EXPIRATION = 2*24*60*60*1000l;
|
||||||
private final static long ROUTER_INFO_EXPIRATION_MIN = 120*60*1000l;
|
private final static long ROUTER_INFO_EXPIRATION_MIN = 90*60*1000l;
|
||||||
private final static long ROUTER_INFO_EXPIRATION_SHORT = 90*60*1000l;
|
private final static long ROUTER_INFO_EXPIRATION_SHORT = 75*60*1000l;
|
||||||
private final static long ROUTER_INFO_EXPIRATION_FLOODFILL = 60*60*1000l;
|
private final static long ROUTER_INFO_EXPIRATION_FLOODFILL = 60*60*1000l;
|
||||||
|
|
||||||
private final static long EXPLORE_JOB_DELAY = 10*60*1000l;
|
private final static long EXPLORE_JOB_DELAY = 10*60*1000l;
|
||||||
@@ -772,17 +772,19 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
|||||||
return "Peer " + key.toBase64() + " published " + DataHelper.formatDuration(age) + " ago";
|
return "Peer " + key.toBase64() + " published " + DataHelper.formatDuration(age) + " ago";
|
||||||
} else if (upLongEnough && !routerInfo.isCurrent(ROUTER_INFO_EXPIRATION_SHORT)) {
|
} else if (upLongEnough && !routerInfo.isCurrent(ROUTER_INFO_EXPIRATION_SHORT)) {
|
||||||
if (routerInfo.getAddresses().isEmpty())
|
if (routerInfo.getAddresses().isEmpty())
|
||||||
return "Peer " + key.toBase64() + " published > 90m ago with no addresses";
|
return "Peer " + key.toBase64() + " published > 75m ago with no addresses";
|
||||||
// This should cover the introducers case below too
|
// This should cover the introducers case below too
|
||||||
// And even better, catches the case where the router is unreachable but knows no introducers
|
// And even better, catches the case where the router is unreachable but knows no introducers
|
||||||
if (routerInfo.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) >= 0)
|
if (routerInfo.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) >= 0)
|
||||||
return "Peer " + key.toBase64() + " published > 90m ago and thinks it is unreachable";
|
return "Peer " + key.toBase64() + " published > 75m ago and thinks it is unreachable";
|
||||||
RouterAddress ra = routerInfo.getTargetAddress("SSU");
|
RouterAddress ra = routerInfo.getTargetAddress("SSU");
|
||||||
if (ra != null) {
|
if (ra != null) {
|
||||||
// Introducers change often, introducee will ping introducer for 2 hours
|
// Introducers change often, introducee will ping introducer for 2 hours
|
||||||
Properties props = ra.getOptions();
|
Properties props = ra.getOptions();
|
||||||
if (props != null && props.getProperty("ihost0") != null)
|
if (props != null && props.getProperty("ihost0") != null)
|
||||||
return "Peer " + key.toBase64() + " published > 90m ago with SSU Introducers";
|
return "Peer " + key.toBase64() + " published > 75m ago with SSU Introducers";
|
||||||
|
if (routerInfo.getTargetAddress("NTCP") == null)
|
||||||
|
return "Peer " + key.toBase64() + " published > 75m ago, SSU only without introducers";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user