Skip to content

Commit 8151fc9

Browse files
ezelkow1cmcfarlen
authored andcommitted
Fix up logging for write-fail-5/collapsed-forwarding (#12050)
The logic here changed so that it no longer loops for all write retries before retrying to the read. So the logging no longer worked correctly (cherry picked from commit c82122e)
1 parent 2c5896b commit 8151fc9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/proxy/logging/LogAccess.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3028,8 +3028,8 @@ LogAccess::marshal_cache_collapsed_connection_success(char *buf)
30283028
if (m_http_sm) {
30293029
SquidLogCode code = m_http_sm->t_state.squid_codes.log_code;
30303030

3031-
// We increment open_write_tries beyond the max when we want to jump back to the read state for collapsing
3032-
if ((m_http_sm->get_cache_sm().get_open_write_tries() > (m_http_sm->t_state.txn_conf->max_cache_open_write_retries)) &&
3031+
// We attempted an open write, but ended up with some sort of HIT which means we must have gone back to the read state
3032+
if ((m_http_sm->get_cache_sm().get_open_write_tries() > (0)) &&
30333033
((code == SQUID_LOG_TCP_HIT) || (code == SQUID_LOG_TCP_MEM_HIT) || (code == SQUID_LOG_TCP_DISK_HIT) ||
30343034
(code == SQUID_LOG_TCP_CF_HIT))) {
30353035
// Attempted collapsed connection and got a hit, success

0 commit comments

Comments
 (0)