Update of /cvsroot/freenet/freenet/src/freenet/node/states/request In directory sc8-pr-cvs1:/tmp/cvs-serv26808/src/freenet/node/states/request
Modified Files: AwaitingStoreData.java RequestState.java SendingReply.java Log Message: 6258: DataReply's get same prio as Requests and DataInserts. Include requests served from store and not routed at all in requestSuccessRatio Disambiguate most/least recent file access times in Environment. Logging, indenting etc. Index: AwaitingStoreData.java =================================================================== RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/request/AwaitingStoreData.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -r1.25 -r1.26 --- AwaitingStoreData.java 30 Aug 2003 23:16:53 -0000 1.25 +++ AwaitingStoreData.java 18 Oct 2003 18:55:22 -0000 1.26 @@ -138,12 +138,13 @@ n.diagnostics.occurrenceCounting("storeDataAwaitingStoreData",1); ft.storeData(n, nr, rate, sd == null ? 0 : sd.hopsSinceReset(), new RequestSendCallback("StoreData", n, this)); - } - catch (CommunicationException e) { + } catch (CommunicationException e) { n.logger.log(this, "Failed to relay StoreData to peer "+e.peer, e, Logger.MINOR); } if (origPeer != null) { + n.logger.log(this, "Logging external success on success*Distribution "+ + "from "+origPeer+" on "+this, Logger.DEBUG); if (isInsert) { if (n.successInsertDistribution != null) { n.successInsertDistribution.add(searchKey.getVal()); Index: RequestState.java =================================================================== RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/request/RequestState.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -r1.17 -r1.18 --- RequestState.java 17 Oct 2003 23:02:02 -0000 1.17 +++ RequestState.java 18 Oct 2003 18:55:22 -0000 1.18 @@ -3,6 +3,7 @@ import freenet.*; import freenet.node.*; import freenet.node.rt.Routing; +import freenet.node.rt.TerminatableRouting; import freenet.support.Fields; import freenet.support.Logger; import java.util.Enumeration; @@ -41,6 +42,8 @@ /** The NodeReferences to route to for this key */ Routing routes; + boolean terminatedRouting = false; + boolean logDEBUG; boolean logMINOR; @@ -80,6 +83,7 @@ restarted = ancestor.restarted; rejected = ancestor.rejected; origHopsToLive = ancestor.origHopsToLive; + terminatedRouting = ancestor.terminatedRouting; logDEBUG = Core.logger.shouldLog(Logger.DEBUG,this); } @@ -162,9 +166,14 @@ } public void terminateRouting(boolean success, boolean routingRelated) { + if(!terminatedRouting) { + terminatedRouting = true; if(routes != null) { routes.terminate(success, routingRelated); // Don't null routes. We need it for the storedata. + } else { + TerminatableRouting.staticReallyTerminate(success, routingRelated); + } } } } Index: SendingReply.java =================================================================== RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/request/SendingReply.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -r1.22 -r1.23 --- SendingReply.java 14 Oct 2003 05:09:11 -0000 1.22 +++ SendingReply.java 18 Oct 2003 18:55:22 -0000 1.23 @@ -66,10 +66,11 @@ // Not our fault, so still counts } // Update successful request distribution - if(origPeer != null) - { - if (n.successDataDistribution != null) - { + if(origPeer != null) { + n.logger.log(this, "Logging external success on "+ + "success*Distribution from "+origPeer+" on "+ + this, Logger.DEBUG); + if (n.successDataDistribution != null) { n.successDataDistribution.add(searchKey.getVal()); } if(n.inboundRequests != null) _______________________________________________ cvs mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs