On Friday 04 January 2008 18:32, Robert Hailey wrote:
>
> Apparently until this revision 16886, (so long as any one node does
> not timeout) a node will take as long as necessary to exhaust routable
> peers. Even long after the original requestor has given up on that node.
Yes. Is this bad? Obviously there are limits - if it gets a post-accepted
timeout on any one node it will finish the request.
Generally I think this is probably a good thing - the data is wanted, so why
not find it? It will be cached and will be transferred later. With ULPRs it
will even be transferred when we complete, despite the timeout.
>
> I suspect good and bad from this. On the one hand, all nodes will
> become much less busy (increase throughput, decrease latency), but the
> data may be not be found at all (as presently the node may continue to
> search all its peers and it be cached for next time).
Right, the advantage of the current system is that the data will probably be
found eventually, and the next time the request is made it will be available
before it times out. But if it's hard to find, if we timeout as you suggest,
it may not be found.
The only real reason I can think of to timeout as you do below would be for
load balancing fairness: If you make a request, you had better be prepared
(bandwidth wise) to accept the resulting data, if you're not, that's a denial
of service attack. Load management relies on propagating the load back to the
requestor. But the requestor can have only a very limited influence on timing
out here so I don't consider it to be valid.
>
> What do you think?
>
> --
> Robert Hailey
>
> On Jan 4, 2008, at 12:22 PM, robert at freenetproject.org wrote:
>
> > Author: robert
> > Date: 2008-01-04 18:22:10 +0000 (Fri, 04 Jan 2008)
> > New Revision: 16886
> >
> > Modified:
> > trunk/freenet/src/freenet/node/RequestSender.java
> > Log:
> > do not continue a search which has already locally timed out
> >
> >
> > Modified: trunk/freenet/src/freenet/node/RequestSender.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/node/RequestSender.java 2008-01-04
> > 17:22:34 UTC (rev 16885)
> > +++ trunk/freenet/src/freenet/node/RequestSender.java 2008-01-04
> > 18:22:10 UTC (rev 16886)
> > @@ -136,6 +136,7 @@
> > pubKey = ((NodeSSK)key).getPubKey();
> > }
> >
> > + long startTime=System.currentTimeMillis();
> > HashSet nodesRoutedTo = new HashSet();
> > HashSet nodesNotIgnored = new HashSet();
> > while(true) {
> > @@ -145,6 +146,12 @@
> > finish(DATA_NOT_FOUND, null);
> > return;
> > }
> > +
> > + if (source!=null && System.currentTimeMillis()-
> > startTime>FETCH_TIMEOUT) {
> > + Logger.error(this, "discontinuing non-local
> > request search,
> > general timeout");
> > + finish(TIMED_OUT, null);
> > + return;
> > + }
> >
> > // Route it
> > PeerNode next;
> > @@ -586,6 +593,7 @@
> > */
> > public synchronized short waitUntilStatusChange(short mask) {
> > if(mask == WAIT_ALL) throw new IllegalArgumentException("Cannot
> >
> > ignore all!");
> > + long startTime=System.currentTimeMillis();
> > while(true) {
> > short current = mask; // If any bits are set already, we
> > ignore those states.
> >
> > @@ -605,6 +613,10 @@
> > } catch (InterruptedException e) {
> > // Ignore
> > }
> > + if (source!=null &&
> > System.currentTimeMillis()-startTime >
> > 2*FETCH_TIMEOUT) {
> > + Logger.error(this, "spending way too long
> > waiting for request
> > sender to finish");
> > + throw new RuntimeException("something is
> > broken");
> > + }
> > }
> > }
> >
> >
> > _______________________________________________
> > cvs mailing list
> > cvs at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> >
>
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20080104/d450f812/attachment.pgp>