On Saturday 18 April 2009 14:59:42 j16sdiz at freenetproject.org wrote:
> Author: j16sdiz
> Date: 2009-04-18 13:59:41 +0000 (Sat, 18 Apr 2009)
> New Revision: 26967
>
> Modified:
> trunk/freenet/src/freenet/node/FailureTableEntry.java
> Log:
> Clean up requestedLocs[] as well
>
> FailureTableEntry.cleanup() did not update requestedLocs[]
> when entries are removed. This field is never used in real
> code, so no harm was ever made.
This should be kept. We may still implement request quenching (RecentlyFailed)
at this level, in which case the locations we have requested a key from
become important as we want to pass a request through if there is a better
route now than the ones that have been tried before.
>
> Modified: trunk/freenet/src/freenet/node/FailureTableEntry.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/FailureTableEntry.java 2009-04-18
13:59:19 UTC (rev 26966)
> +++ trunk/freenet/src/freenet/node/FailureTableEntry.java 2009-04-18
13:59:41 UTC (rev 26967)
> @@ -499,6 +499,7 @@
> requestedNodes[x] = requestedNodes[i];
> requestedTimes[x] = requestedTimes[i];
> requestedBootIDs[x] = requestedBootIDs[i];
> + requestedLocs[x] = requestedLocs[i];
> if(now < requestedTimeouts[x]) {
> requestedTimeouts[x] = requestedTimeouts[i];
> requestedTimeoutHTLs[x] =
> requestedTimeoutHTLs[i];
> @@ -513,16 +514,19 @@
> WeakReference<PeerNode>[] newRequestedNodes = new
> WeakReference[x];
> long[] newRequestedTimes = new long[x];
> long[] newRequestedBootIDs = new long[x];
> + double[] newRequestedLocs = new double[x];
> long[] newRequestedTimeouts = new long[x];
> short[] newRequestedTimeoutHTLs = new short[x];
> System.arraycopy(requestedNodes, 0, newRequestedNodes,
> 0, x);
> System.arraycopy(requestedTimes, 0, newRequestedTimes,
> 0, x);
> System.arraycopy(requestedBootIDs, 0,
> newRequestedBootIDs, 0, x);
> + System.arraycopy(requestedLocs, 0, newRequestedLocs, 0,
> x);
> System.arraycopy(requestedTimeouts, 0,
> newRequestedTimeouts, 0, x);
> System.arraycopy(requestedTimeoutHTLs, 0,
> newRequestedTimeoutHTLs, 0,
x);
> requestedNodes = newRequestedNodes;
> requestedTimes = newRequestedTimes;
> requestedBootIDs = newRequestedBootIDs;
> + requestedLocs = newRequestedLocs;
> requestedTimeouts = newRequestedTimeouts;
> requestedTimeoutHTLs = newRequestedTimeoutHTLs;
> }
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20090428/ea0def01/attachment.pgp>