Author: mrogers
Date: 2006-11-17 20:35:49 +0000 (Fri, 17 Nov 2006)
New Revision: 10975

Modified:
   trunk/apps/load-balancing-sims/phase7/sim/Node.java
   trunk/apps/load-balancing-sims/phase7/sim/handlers/ChkInsertHandler.java
   trunk/apps/load-balancing-sims/phase7/sim/handlers/MessageHandler.java
   trunk/apps/load-balancing-sims/phase7/sim/handlers/RequestHandler.java
Log:
log the reason for request and insert failures - SSK inserts often seem to fail 
with RNF, not sure why

Modified: trunk/apps/load-balancing-sims/phase7/sim/Node.java
===================================================================
--- trunk/apps/load-balancing-sims/phase7/sim/Node.java 2006-11-17 14:40:14 UTC 
(rev 10974)
+++ trunk/apps/load-balancing-sims/phase7/sim/Node.java 2006-11-17 20:35:49 UTC 
(rev 10975)
@@ -15,7 +15,7 @@
        // Flow control
        public final static boolean USE_TOKENS = false;
        public final static boolean USE_BACKOFF = false;
-       public final static boolean USE_THROTTLE = false;
+       public final static boolean USE_THROTTLE = true;
        public final static int FLOW_TOKENS = 20; // Shared by all peers
        public final static double TOKEN_DELAY = 1.0; // Allocate initial tokens
        public final static double DELAY_DECAY = 0.99; // Exp moving average

Modified: 
trunk/apps/load-balancing-sims/phase7/sim/handlers/ChkInsertHandler.java
===================================================================
--- trunk/apps/load-balancing-sims/phase7/sim/handlers/ChkInsertHandler.java    
2006-11-17 14:40:14 UTC (rev 10974)
+++ trunk/apps/load-balancing-sims/phase7/sim/handlers/ChkInsertHandler.java    
2006-11-17 20:35:49 UTC (rev 10975)
@@ -169,7 +169,7 @@
        {
                if (inState != STARTED) return;
                node.log (this + " data timeout from " + prev);
-               if (prev == null) node.log (this + " failed"); // Don't throttle
+               if (prev == null) node.log (this + " failed (xfer start)");
                else prev.sendMessage (new TransfersCompleted (id));
                reallyFinish();
        }
@@ -179,7 +179,7 @@
        {
                if (inState != TRANSFERRING) return;
                node.log (this + " transfer timeout from " + prev);
-               if (prev == null) node.log (this + " failed"); // Don't throttle
+               if (prev == null) node.log (this + " failed (xfer end)");
                else prev.sendMessage (new TransfersCompleted (id));
                reallyFinish();
        }

Modified: trunk/apps/load-balancing-sims/phase7/sim/handlers/MessageHandler.java
===================================================================
--- trunk/apps/load-balancing-sims/phase7/sim/handlers/MessageHandler.java      
2006-11-17 14:40:14 UTC (rev 10974)
+++ trunk/apps/load-balancing-sims/phase7/sim/handlers/MessageHandler.java      
2006-11-17 20:35:49 UTC (rev 10975)
@@ -66,7 +66,7 @@
                next = closestPeer();
                if (next == null) {
                        node.log ("route not found for " + this);
-                       if (prev == null) node.log (this + " failed");
+                       if (prev == null) node.log (this + " failed (rnf)");
                        else prev.sendMessage (new RouteNotFound (id, htl));
                        finish();
                        return;
@@ -163,7 +163,7 @@
                // Tell the sender to slow down
                if (prev == null) node.reduceSearchRate (this);
                else prev.sendMessage (new RejectedOverload (id, false));
-               if (prev == null) node.log (this + " failed");
+               if (prev == null) node.log (this + " failed (search)");
                finish();
        }


Modified: trunk/apps/load-balancing-sims/phase7/sim/handlers/RequestHandler.java
===================================================================
--- trunk/apps/load-balancing-sims/phase7/sim/handlers/RequestHandler.java      
2006-11-17 14:40:14 UTC (rev 10974)
+++ trunk/apps/load-balancing-sims/phase7/sim/handlers/RequestHandler.java      
2006-11-17 20:35:49 UTC (rev 10975)
@@ -29,14 +29,14 @@
        protected void handleDataNotFound (DataNotFound dnf)
        {
                if (searchState != ACCEPTED) node.log (dnf + " out of order");
-               if (prev == null) node.log (this + " failed");
+               if (prev == null) node.log (this + " failed (dnf)");
                else prev.sendMessage (dnf); // Forward the message
                finish();
        }

        protected void sendReply()
        {
-               if (prev == null) node.log (this + " failed");
+               if (prev == null) node.log (this + " failed (dnf)");
                else prev.sendMessage (new DataNotFound (id));
        }

@@ -56,7 +56,7 @@
        {
                if (searchState != TRANSFERRING) return;
                node.log (this + " transfer timeout from " + p);
-               if (prev == null) node.log (this + " failed");
+               if (prev == null) node.log (this + " failed (xfer)");
                finish();
        }



Reply via email to