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

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 069d5a36d0 Fix: set UA_BEGIN_WRITE milestone unconditionally (#12898)
069d5a36d0 is described below

commit 069d5a36d03d1adf6e1e8e1176c562f58dc708ce
Author: Bryan Call <[email protected]>
AuthorDate: Fri Feb 20 16:02:53 2026 -0800

    Fix: set UA_BEGIN_WRITE milestone unconditionally (#12898)
    
    Mark TS_MILESTONE_UA_BEGIN_WRITE in the SERVER_READ and SERVE_FROM_CACHE
    paths of handle_api_return(). Previously this milestone was only set in
    the API_SEND_RESPONSE_HDR hook path, which requires a plugin to hook
    TS_HTTP_SEND_RESPONSE_HDR_HOOK. Without plugins the milestone stayed
    at zero, causing msdms log fields that reference UA_BEGIN_WRITE
    (c_ttfb, o_proc, o_body, hit_proc, hit_xfer) to report -1.
---
 src/proxy/http/HttpSM.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index c6fd71a3cf..4fbc532726 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -1691,6 +1691,7 @@ HttpSM::handle_api_return()
     break;
   }
   case HttpTransact::StateMachineAction_t::SERVER_READ: {
+    milestones.mark(TS_MILESTONE_UA_BEGIN_WRITE);
     if (unlikely(t_state.did_upgrade_succeed)) {
       // We've successfully handled the upgrade, let's now setup
       // a blind tunnel.
@@ -1727,6 +1728,7 @@ HttpSM::handle_api_return()
     break;
   }
   case HttpTransact::StateMachineAction_t::SERVE_FROM_CACHE: {
+    milestones.mark(TS_MILESTONE_UA_BEGIN_WRITE);
     HttpTunnelProducer *p = setup_cache_read_transfer();
     tunnel.tunnel_run(p);
     break;

Reply via email to