On Saturday 18 April 2009 14:59:42 [email protected] 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
> [email protected]
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
