This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 8151fc9fdd1328a3136ac251e2d5c99763fc6930
Author: Evan Zelkowitz <[email protected]>
AuthorDate: Mon Feb 24 16:12:28 2025 -0700

    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 c82122e743258d26f05874330959f23d56d64fec)
---
 src/proxy/logging/LogAccess.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/proxy/logging/LogAccess.cc b/src/proxy/logging/LogAccess.cc
index 9a5075b3ee..0e1719a606 100644
--- a/src/proxy/logging/LogAccess.cc
+++ b/src/proxy/logging/LogAccess.cc
@@ -3028,8 +3028,8 @@ 
LogAccess::marshal_cache_collapsed_connection_success(char *buf)
     if (m_http_sm) {
       SquidLogCode code = m_http_sm->t_state.squid_codes.log_code;
 
-      // We increment open_write_tries beyond the max when we want to jump 
back to the read state for collapsing
-      if ((m_http_sm->get_cache_sm().get_open_write_tries() > 
(m_http_sm->t_state.txn_conf->max_cache_open_write_retries)) &&
+      // We attempted an open write, but ended up with some sort of HIT which 
means we must have gone back to the read state
+      if ((m_http_sm->get_cache_sm().get_open_write_tries() > (0)) &&
           ((code == SQUID_LOG_TCP_HIT) || (code == SQUID_LOG_TCP_MEM_HIT) || 
(code == SQUID_LOG_TCP_DISK_HIT) ||
            (code == SQUID_LOG_TCP_CF_HIT))) {
         // Attempted collapsed connection and got a hit, success

Reply via email to