- Note failed floods in the profile

- Reduce max flood
This commit is contained in:
zzz
2009-11-18 14:24:38 +00:00
parent 746dc6f884
commit 312ba2599f
3 changed files with 30 additions and 2 deletions

View File

@ -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 2009-11-16 zzz
* addressbook: Move class to net.i2p.addressbook * addressbook: Move class to net.i2p.addressbook
* build: Take two test scripts out of the installer * build: Take two test scripts out of the installer

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 18; public final static long BUILD = 19;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;

View File

@ -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. * Send to a subset of all floodfill peers.
@ -139,6 +139,10 @@ public class FloodfillNetworkDatabaseFacade extends KademliaNetworkDatabaseFacad
m.setPriority(FLOOD_PRIORITY); m.setPriority(FLOOD_PRIORITY);
m.setTarget(target); m.setTarget(target);
m.setExpiration(_context.clock().now()+FLOOD_TIMEOUT); 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); _context.commSystem().processMessage(m);
flooded++; flooded++;
if (_log.shouldLog(Log.INFO)) 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"); _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_PRIORITY = 200;
private static final int FLOOD_TIMEOUT = 30*1000; private static final int FLOOD_TIMEOUT = 30*1000;