NetDB: Randomize delay before floodfill store verify

This commit is contained in:
zzz
2013-02-12 14:58:52 +00:00
parent 3a2accdebb
commit 51edaed610
3 changed files with 12 additions and 3 deletions

View File

@ -1,4 +1,12 @@
2013-02-12 zzz
* NetDB: Randomize delay before floodfill store verify
2013-02-10 zzz 2013-02-10 zzz
* Logs: Again fix setting log filename (ticket #805)
* Update: Bump torrent update to 3% of routers
* Wrapper: Update ARMv6 Java Service Wrapper to v3.5.17 (ticket #826).
2013-02-09 zzz
* NetDB: * NetDB:
- Encrypt DatabaseLookup messages out exploratory tunnels - Encrypt DatabaseLookup messages out exploratory tunnels
when we already have the RI of the ff when we already have the RI of the ff

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 = 10; public final static long BUILD = 11;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";

View File

@ -37,7 +37,8 @@ class FloodfillVerifyStoreJob extends JobImpl {
private MessageWrapper.WrappedMessage _wrappedMessage; private MessageWrapper.WrappedMessage _wrappedMessage;
private final Set<Hash> _ignore; private final Set<Hash> _ignore;
private static final int START_DELAY = 20*1000; private static final int START_DELAY = 18*1000;
private static final int START_DELAY_RAND = 9*1000;
private static final int VERIFY_TIMEOUT = 20*1000; private static final int VERIFY_TIMEOUT = 20*1000;
private static final int MAX_PEERS_TO_TRY = 4; private static final int MAX_PEERS_TO_TRY = 4;
@ -59,7 +60,7 @@ class FloodfillVerifyStoreJob extends JobImpl {
_ignore.add(_sentTo); _ignore.add(_sentTo);
} }
// wait some time before trying to verify the store // wait some time before trying to verify the store
getTiming().setStartAfter(ctx.clock().now() + START_DELAY); getTiming().setStartAfter(ctx.clock().now() + START_DELAY + ctx.random().nextInt(START_DELAY_RAND));
getContext().statManager().createRateStat("netDb.floodfillVerifyOK", "How long a floodfill verify takes when it succeeds", "NetworkDatabase", new long[] { 60*60*1000 }); getContext().statManager().createRateStat("netDb.floodfillVerifyOK", "How long a floodfill verify takes when it succeeds", "NetworkDatabase", new long[] { 60*60*1000 });
getContext().statManager().createRateStat("netDb.floodfillVerifyFail", "How long a floodfill verify takes when it fails", "NetworkDatabase", new long[] { 60*60*1000 }); getContext().statManager().createRateStat("netDb.floodfillVerifyFail", "How long a floodfill verify takes when it fails", "NetworkDatabase", new long[] { 60*60*1000 });
getContext().statManager().createRateStat("netDb.floodfillVerifyTimeout", "How long a floodfill verify takes when it times out", "NetworkDatabase", new long[] { 60*60*1000 }); getContext().statManager().createRateStat("netDb.floodfillVerifyTimeout", "How long a floodfill verify takes when it times out", "NetworkDatabase", new long[] { 60*60*1000 });