I made a commit, but the email didn't make it to the cvs thread  
(r16740), probably because of a question mark in the log. The diff  
follows in case it doesn't show up later.

--
Robert Hailey

Index: freenet/node/CHKInsertSender.java
===================================================================
--- freenet/node/CHKInsertSender.java   (revision 16739)
+++ freenet/node/CHKInsertSender.java   (revision 16740)
@@ -290,7 +290,20 @@
              // Send to next node

              try {
-                               next.sendSync(req, this);
+                               /*
+                                When using sendSync(), this send can often 
timeout (it is the  
first request we are sending to this node).
+                                -If sendSync blocks here (message queue is 
full, node down,  
etc.) it can take up to 10 minutes,
+                                 if this occurs at even two nodes in any given 
insert (at any  
point in the path), the entire insert chain
+                                 will fatally timeout.
+                                -We cannot be informed if sendSync() does 
timeout. A message  
will be logged, but this thread will simply continue
+                                  to the waitFor() and spend another timeout 
period there.
+                                -The timeout on the waitFor() is 10 seconds 
(ACCEPTED_TIMEOUT).
+                                -The interesting case is when this next node 
is temporarily  
busy, in which case we might skip a busy node if they
+                                  don't respond in ten seconds 
(ACCEPTED_TIMEOUT). Or, if the  
length of the send queue to them is greater than
+                                  ACCEPTED_TIMEOUT, using sendAsync() will 
skip them before they  
get the request. This would be a need for retuning
+                                  ACCEPTED_TIMEOUT.
+                                */
+                               next.sendAsync(req, null, 0, this);
                        } catch (NotConnectedException e1) {
                                if(logMINOR) Logger.minor(this, "Not connected 
to "+next);
                                continue;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20071219/172f159c/attachment.html>

Reply via email to