You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2011/02/15 18:57:52 UTC

svn commit: r1070989 - /trafficserver/traffic/trunk/iocore/cache/CacheRead.cc

Author: jplevyak
Date: Tue Feb 15 17:57:52 2011
New Revision: 1070989

URL: http://svn.apache.org/viewvc?rev=1070989&view=rev
Log:
Enhance Warning for truncated documents to give more details.

Modified:
    trafficserver/traffic/trunk/iocore/cache/CacheRead.cc

Modified: trafficserver/traffic/trunk/iocore/cache/CacheRead.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheRead.cc?rev=1070989&r1=1070988&r2=1070989&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheRead.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheRead.cc Tue Feb 15 17:57:52 2011
@@ -471,11 +471,11 @@ CacheVC::openReadFromWriterMain(int even
   if (ntodo <= 0)
     return EVENT_CONT;
   if (length < ((int64_t)doc_len) - vio.ndone) {
-    DDebug("cache_read_agg", "truncation %X", earliest_key.word(0));
+    DDebug("cache_read_agg", "truncation %X", first_key.word(1));
     if (is_action_tag_set("cache")) {
       ink_release_assert(false);
     }
-    Warning("Document for %X truncated", earliest_key.word(0));
+    Warning("Document %X truncated at %d of %d, reading from writer", first_key.word(1), (int)vio.ndone, (int)doc_len);
     return calluser(VC_EVENT_ERROR);
   }
   /* its possible that the user did a do_io_close before
@@ -592,7 +592,7 @@ CacheVC::openReadReadDone(int event, Eve
   }
 Lerror:
   char tmpstring[100];
-  Warning("Document truncated for %s", earliest_key.string(tmpstring));
+  Warning("Document %s truncated", earliest_key.string(tmpstring));
   return calluser(VC_EVENT_ERROR);
 Ldone:
   return calluser(VC_EVENT_EOS);
@@ -713,17 +713,17 @@ Lread: {
             goto Leos;
           }
         }
-        DDebug("cache_read_agg", "%x: key: %X ReadMain writer aborted: %d",
+        DDebug("cache_read_agg", "%X: key: %X ReadMain writer aborted: %d",
               this, first_key.word(1), (int)vio.ndone);
         goto Lerror;
       }
-      DDebug("cache_read_agg", "%x: key: %X ReadMain retrying: %d", this, first_key.word(1), (int)vio.ndone);
+      DDebug("cache_read_agg", "%X: key: %X ReadMain retrying: %d", this, first_key.word(1), (int)vio.ndone);
       SET_HANDLER(&CacheVC::openReadMain);
       VC_SCHED_WRITER_RETRY();
     }
     if (is_action_tag_set("cache"))
       ink_release_assert(false);
-    Warning("Document for %X truncated", earliest_key.word(0));
+    Warning("Document %X truncated at %d of %d, missing fragment %X", first_key.word(1), (int)vio.ndone, (int)doc_len, key.word(1));
     // remove the directory entry
     dir_delete(&earliest_key, part, &earliest_dir);
   }