This is harder than it appears.

I've turned off request coalescing in trunk.

IMHO the best option is to implement ULPRs, then change the code to send a 
RecentlyFailed with a timeout of zero (so it kills the request, doesn't 
prevent future requests for the same key, but they will be redirected, and if 
the data is found by the original request, it is sent to the requestor).

On Saturday 19 January 2008 11:48, Matthew Toseland wrote:
> DOH! It appears that I did not in fact implement the fix I had proposed.
> 
> What you have to do is send a downstream notification of the UID that the 
> request has joined with. And keep a list of all the UIDs that are valid for 
> this request, so that we reject-loop correctly. And then if we get a UID 
> we're already joined to... hmmm I dunno ...
> 
> Can you fix it? I'm out for a few hours...
> 
> On Saturday 19 January 2008 05:51, Robert Hailey wrote:
> > 
> > Requests equi-distant from each other can create dead-lock loops  
> > because the uid changes. Without disabling request coalescing  
> > altogether I could not think of a better solution, but this solves 90%  
> > of the problem.
> > 
> > There is another deadlock condition regarding probablisticHtl  
> > decrementing which is much less likely (requires at least a 5-node  
> > race condition) as follows:
> > 
> >          B
> >    A   C
> >      D
> >        E
> > 
> > C, D, & E each respectively probabilistically don't decrement
> > 
> > (1) Node A (2/11) & B(2/22) both start/route a request (htl/uid)
> > (2) D routes to E (1/11)
> > (3) C routes to D (1/22), where the request is coalesced with (1/11)
> > (4) E routes to C where the request is coalesced with (1/22).
> > 
> > Without this patch even if it were only two nodes starting (for  
> > example, a USK fetch) at the same time, they would each ask the other  
> > and each request would be coalesced onto the other.
> > 
> > --
> > Robert Hailey
> > 
> > On Jan 18, 2008, at 11:02 PM, robert at freenetproject.org wrote:
> > 
> > > Author: robert
> > > Date: 2008-01-19 05:02:58 +0000 (Sat, 19 Jan 2008)
> > > New Revision: 17164
> > >
> > > Modified:
> > >   trunk/freenet/src/freenet/node/Node.java
> > >   trunk/freenet/src/freenet/node/RequestSender.java
> > > Log:
> > > fix fatal timeout
> > >
> > >
> > > Modified: trunk/freenet/src/freenet/node/Node.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/node/Node.java      2008-01-19 03:33:18 UTC 
> > >  
> > > (rev 17163)
> > > +++ trunk/freenet/src/freenet/node/Node.java      2008-01-19 05:02:58 UTC 
> > >  
> > > (rev 17164)
> > > @@ -1779,7 +1779,7 @@
> > >                   // Request coalescing
> > >                   KeyHTLPair kh = new KeyHTLPair(key, htl);
> > >                   sender = (RequestSender) requestSenders.get(kh);
> > > -                 if(sender != null) {
> > > +                 if(sender != null && !sender.isLocalRequestSearch()) {
> > >                           if(logMINOR) Logger.minor(this, "Found sender: 
> > > "+sender+" for  
> > > "+uid);
> > >                           return sender;
> > >                   }
> > >
> > > Modified: trunk/freenet/src/freenet/node/RequestSender.java
> > > ===================================================================
> > > --- trunk/freenet/src/freenet/node/RequestSender.java     2008-01-19  
> > > 03:33:18 UTC (rev 17163)
> > > +++ trunk/freenet/src/freenet/node/RequestSender.java     2008-01-19  
> > > 05:02:58 UTC (rev 17164)
> > > @@ -851,4 +851,8 @@
> > >   synchronized int getRecentlyFailedTimeLeft() {
> > >           return recentlyFailedTimeLeft;
> > >   }
> > > + 
> > > + public boolean isLocalRequestSearch() {
> > > +         return (source==null);
> > > + }
> > > }
> > >
> > > _______________________________________________
> > > 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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080119/271e7852/attachment.pgp>

Reply via email to