Update of /cvsroot/freenet/freenet/src/freenet/node/states/request
In directory sc8-pr-cvs1:/tmp/cvs-serv25229/src/freenet/node/states/request

Modified Files:
        Pending.java TransferInsert.java 
Log Message:
don't show RT histogram if not using CPAlgoRT. Fix caption on successful inserts page. 
Implement log rotation with optional compression using external native gzip. Logging. 
New diags insertRoutingSuccessRatio, insertNonRoutingSuccessRatio, 
insertFailRoutingNonRoutingRatio. Improved toString() on some objects. Ignore 
QueryRejected.hopsToLive - use hopsToLive/2. Give StoreData a much longer timeout when 
we go to AWSD from an insert.


Index: Pending.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/states/request/Pending.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- Pending.java        30 Aug 2003 23:16:53 -0000      1.49
+++ Pending.java        2 Sep 2003 17:05:22 -0000       1.50
@@ -160,8 +160,8 @@
        
         ++rejected;
        
-        // reduce our HTL like the man sez, but by at least 1
-        hopsToLive = (int) Math.min(hopsToLive-1, qr.hopsToLive);
+       // Umm, no. Rejecting node should not have any influence
+        hopsToLive = (int) Math.min(hopsToLive-1, hopsToLive/2);
         
        if(logDEBUG)
            n.logger.log(this, "Rejected count: "+rejected+
@@ -652,6 +652,8 @@
       * unrecoverable error.  Does nothing if the key is not found.
       */
     void searchData(Node n) throws RequestAbortException {
+       n.logger.log(this, "searchData() on "+this,
+                    new Exception("debug"), Logger.DEBUG);
        long startTime = System.currentTimeMillis();
        long thrownTime = -1;
         KeyInputStream doc = null;
@@ -659,7 +661,8 @@
            try {
                if(logDEBUG)
                    n.logger.log(this, "Trying to fetch "+this
-                                +" at "+startTime, Core.logger.DEBUG);
+                                +" at "+startTime, new Exception("debug"),
+                                Core.logger.DEBUG);
                doc = n.ds.getData(searchKey);
                long gotDataTime = System.currentTimeMillis();
                if(logDEBUG)

Index: TransferInsert.java
===================================================================
RCS file: 
/cvsroot/freenet/freenet/src/freenet/node/states/request/TransferInsert.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TransferInsert.java 30 Aug 2003 23:16:53 -0000      1.11
+++ TransferInsert.java 2 Sep 2003 17:05:22 -0000       1.12
@@ -172,7 +172,7 @@
            State awsd;
             if (storeData == null) {
                 NoStoreData nosd = new NoStoreData(this);
-                n.schedule(Core.hopTime(2), nosd);
+                n.schedule(Core.hopTime(hopsToLive*2), nosd);
                 awsd = new AwaitingStoreData(this, nosd, false);
             } else {
                 mq.addElement(storeData);
@@ -215,6 +215,8 @@
         if (receivingData != dr.source()) {
             throw new BadStateException("Not my DataReceived: "+dr+" for "+this);
         }
+       if(logDEBUG)
+           n.logger.log(this, "Got "+dr+" for "+this, Logger.DEBUG);
         dataReceived = dr;
         int cb = dr.getCB();
         switch (cb) {
@@ -254,6 +256,8 @@
         if (sendingData != ds.source()) {
             throw new BadStateException("Not my DataSent: "+ds);
         }
+       if(logDEBUG)
+           n.logger.log(this, "Got "+ds+" for "+this, Logger.DEBUG);
        endTransferTime = System.currentTimeMillis();
         dataSent = ds;
         int cb = ds.getCB();

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to