diff --git a/history.txt b/history.txt index cfdeb9852..45ede2a7d 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,13 @@ +2009-11-18 zzz + * Build: Don't update the po files by default, add new + target "poupdate" to do that. + * Netdb: + - Floodfill rework part 3 of N: Send closest-to-the-key + in DSRM replies + - Adjust criteria for following DSRM + - Note failed floods in the profile + - Reduce max flood + 2009-11-16 zzz * addressbook: Move class to net.i2p.addressbook * build: Take two test scripts out of the installer diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 4c8aefc89..40028c0e0 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 18; + public final static long BUILD = 19; /** for example "-test" */ public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; 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 1664094c2..4fbaf381e 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java @@ -99,7 +99,7 @@ public class FloodfillNetworkDatabaseFacade extends KademliaNetworkDatabaseFacad } } - private static final int MAX_TO_FLOOD = 9; + private static final int MAX_TO_FLOOD = 7; /** * Send to a subset of all floodfill peers. @@ -139,6 +139,10 @@ public class FloodfillNetworkDatabaseFacade extends KademliaNetworkDatabaseFacad m.setPriority(FLOOD_PRIORITY); m.setTarget(target); m.setExpiration(_context.clock().now()+FLOOD_TIMEOUT); + // note send failure but don't give credit on success + // might need to change this + Job floodFail = new FloodFailedJob(_context, peer); + m.setOnFailedSendJob(floodFail); _context.commSystem().processMessage(m); flooded++; if (_log.shouldLog(Log.INFO)) @@ -149,6 +153,20 @@ public class FloodfillNetworkDatabaseFacade extends KademliaNetworkDatabaseFacad _log.info("Flooded the data to " + flooded + " of " + peers.size() + " peers"); } + /** note in the profile that the store failed */ + private static class FloodFailedJob extends JobImpl { + private Hash _peer; + + public FloodFailedJob(RouterContext ctx, Hash peer) { + super(ctx); + _peer = peer; + } + public String getName() { return "Flood failed"; } + public void runJob() { + getContext().profileManager().dbStoreFailed(_peer); + } + } + private static final int FLOOD_PRIORITY = 200; private static final int FLOOD_TIMEOUT = 30*1000;