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.

Are you quite sure? We send the UID of the request we coalesce with back along 
the chain, so a request can't indirectly coalesce with itself, can it?
> 
> 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.

That sort of thing we expect, but IIRC we deal with the problem, don't we?
> 
> --
> 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/fba9acd6/attachment.pgp>

Reply via email to