]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Mark refresh-waiting transactions with REFRESH.
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 2 Jun 2016 09:49:19 +0000 (21:49 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 2 Jun 2016 09:49:19 +0000 (21:49 +1200)
Before this change, transactions initiating a refresh were still marked
as TCP_HIT*. If such a transaction was terminated (for any reason)
before receiving an IMS reply, it was logged with that misleading tag.
Now, such transactions are logged using TCP_REFRESH[_ABORTED].

After the refresh (successful or otherwise), the tag changes to one of
the other TCP_REFRESH_* values, as before.

src/LogTags.cc
src/LogTags.h
src/client_side_reply.cc

index 2106570f9646a0a7f20b5e887c1e5a5ccb8e9b5e..f2b5e40a09408931527a6e3a028c69081ee33ee4 100644 (file)
@@ -18,6 +18,7 @@ const char * LogTags::Str_[] = {
     "TCP_REFRESH_FAIL_OLD",
     "TCP_REFRESH_FAIL_ERR",
     "TCP_REFRESH_MODIFIED",
+    "TCP_REFRESH",
     "TCP_CLIENT_REFRESH_MISS",
     "TCP_IMS_HIT",
     "TCP_SWAPFAIL_MISS",
index 8a0333461b7426f972111a1bbd12329643ff33ae..635ee41d6f708bb71a3064515b00b69f4187c069 100644 (file)
@@ -25,6 +25,7 @@ typedef enum {
     LOG_TCP_REFRESH_FAIL_OLD,   // refresh from origin failed, stale reply sent
     LOG_TCP_REFRESH_FAIL_ERR,   // refresh from origin failed, error forwarded
     LOG_TCP_REFRESH_MODIFIED,   // refresh from origin replaced existing entry
+    LOG_TCP_REFRESH,            // refresh from origin started, but still pending
     LOG_TCP_CLIENT_REFRESH_MISS,
     LOG_TCP_IMS_HIT,
     LOG_TCP_SWAPFAIL_MISS,
index 76d7ace9f5240d51db7c29e1d3edd3368c852123..eac883a5a6a590b74300105d97e1da9e23e4be73 100644 (file)
@@ -278,6 +278,7 @@ clientReplyContext::processExpired()
         return;
     }
 
+    http->logType = LOG_TCP_REFRESH;
     http->request->flags.refresh = true;
 #if STORE_CLIENT_LIST_DEBUG
     /* Prevent a race with the store client memory free routines