From: Eduard Bagdasaryan Date: Thu, 2 Jun 2016 09:49:19 +0000 (+1200) Subject: Mark refresh-waiting transactions with REFRESH. X-Git-Tag: SQUID_4_0_11~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb72b1ca5dd94f2418639ef8123471dcfbaa9e89;p=thirdparty%2Fsquid.git Mark refresh-waiting transactions with REFRESH. 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. --- diff --git a/src/LogTags.cc b/src/LogTags.cc index 2106570f96..f2b5e40a09 100644 --- a/src/LogTags.cc +++ b/src/LogTags.cc @@ -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", diff --git a/src/LogTags.h b/src/LogTags.h index 8a0333461b..635ee41d6f 100644 --- a/src/LogTags.h +++ b/src/LogTags.h @@ -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, diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 76d7ace9f5..eac883a5a6 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -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