Author: toad
Date: 2008-01-19 23:44:16 +0000 (Sat, 19 Jan 2008)
New Revision: 17169

Modified:
   trunk/freenet/src/freenet/node/Node.java
Log:
Explain *why* we disabled request coalescing

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2008-01-19 18:39:04 UTC (rev 
17168)
+++ trunk/freenet/src/freenet/node/Node.java    2008-01-19 23:44:16 UTC (rev 
17169)
@@ -1777,17 +1777,14 @@

                synchronized(requestSenders) {

-                       // Request coalescing causes deadlocks due to A joining 
B joining C joining A. 
-                       // Turn it off until we can properly fix it.
+                       // No request coalescing.
+                       // Given that HTL can be reset (also if we had no HTL),
+                       // request coalescing causes deadlocks: Request A joins 
request B, which then
+                       // joins request A. There are various convoluted fixes, 
but IMHO
+                       // the best solution long term is to kill the request 
(RecentlyFailed with 
+                       // 0 timeout so it doesn't prevent future requests), 
and send it the data 
+                       // through ULPRs if it is found.

-//                     // Request coalescing
-//                     KeyHTLPair kh = new KeyHTLPair(key, htl);
-//                     sender = (RequestSender) requestSenders.get(kh);
-//                     if(sender != null && !sender.isLocalRequestSearch()) {
-//                             if(logMINOR) Logger.minor(this, "Found sender: 
"+sender+" for "+uid);
-//                             return sender;
-//                     }
-                       
                        sender = new RequestSender(key, null, htl, uid, this, 
closestLocation, resetClosestLocation, source);
                        // RequestSender adds itself to requestSenders
                }


Reply via email to