diff --git a/history.txt b/history.txt index 1dad21e06..d00a745df 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,8 @@ -$Id: history.txt,v 1.500 2006-07-27 22:34:59 jrandom Exp $ +$Id: history.txt,v 1.501 2006-07-28 20:11:52 jrandom Exp $ + +2006-07-28 jrandom + * Don't try to reverify too many netDb entries at once (thanks + cervantes and Complication!) 2006-07-28 jrandom * Actually fix the threading deadlock issue in the netDb (removing diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 79c947641..d1edd57c7 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.439 $ $Date: 2006-07-27 22:35:00 $"; + public final static String ID = "$Revision: 1.440 $ $Date: 2006-07-28 20:11:54 $"; public final static String VERSION = "0.6.1.23"; - public final static long BUILD = 1; + public final static long BUILD = 2; 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/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java index 3ebb52828..c37a7feed 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java @@ -233,6 +233,12 @@ public class FloodfillNetworkDatabaseFacade extends KademliaNetworkDatabaseFacad } protected void lookupBeforeDropping(Hash peer, RouterInfo info) { + if (_context.jobQueue().getMaxLag() > 500) { + // don't try to overload ourselves (e.g. failing 3000 router refs at + // once, and then firing off 3000 netDb lookup tasks) + super.lookupBeforeDropping(peer, info); + return; + } // this sends out the search to the floodfill peers even if we already have the // entry locally, firing no job if it gets a reply with an updated value (meaning // we shouldn't drop them but instead use the new data), or if they all time out, diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java b/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java index 63ae0f60f..557684770 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java @@ -363,16 +363,16 @@ class PersistentDataStore extends TransientDataStore { } } } catch (DataFormatException dfe) { - if (_log.shouldLog(Log.ERROR)) - _log.error("Error reading the routerInfo from " + _routerFile.getName(), dfe); + if (_log.shouldLog(Log.INFO)) + _log.info("Error reading the routerInfo from " + _routerFile.getName(), dfe); corrupt = true; } finally { if (fis != null) try { fis.close(); } catch (IOException ioe) {} } if (corrupt) _routerFile.delete(); } catch (IOException ioe) { - if (_log.shouldLog(Log.ERROR)) - _log.error("Unable to read the router reference in " + _routerFile.getName(), ioe); + if (_log.shouldLog(Log.INFO)) + _log.info("Unable to read the router reference in " + _routerFile.getName(), ioe); } } }