You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2026/06/24 22:25:03 UTC
[PR] log-milestone-fields.test.py: fix hit_proc flake [trafficserver]
bneradt opened a new pull request, #13325:
URL: https://github.com/apache/trafficserver/pull/13325
The log-milestone-fields AuTest can see a valid RAM-cache hit where
TS_MILESTONE_UA_BEGIN_WRITE is recorded one millisecond before
TS_MILESTONE_CACHE_OPEN_READ_END. The msdms formatter serializes that
-1ms delta with the same value it uses for an unset milestone, so the
validator can report a false missing hit_proc field.
This keeps hit_xfer strict and allows hit_proc='-' only when the
surrounding logged deltas prove the value is exactly that -1ms sentinel
collision. Other missing or invalid cache-hit timing fields still fail
validation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HttpSM.cc: fix cache read end milestone order [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #13325:
URL: https://github.com/apache/trafficserver/pull/13325#issuecomment-4804903198
Cherry-picked to 10.1.x branch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HttpSM.cc: fix cache read end milestone order [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #13325:
URL: https://github.com/apache/trafficserver/pull/13325#discussion_r3470771333
##########
src/proxy/http/HttpSM.cc:
##########
@@ -2665,6 +2665,11 @@ HttpSM::state_cache_open_read(int event, void *data)
ink_assert(server_entry == nullptr);
ink_assert(t_state.cache_info.object_read == nullptr);
+ // Record the cache open-read completion before state handling can advance
+ // into cache serving and stamp later transaction milestones.
+ ATS_PROBE1(milestone_cache_open_read_end, sm_id);
+ milestones[TS_MILESTONE_CACHE_OPEN_READ_END] = ink_get_hrtime();
+
Review Comment:
Addressed locally by moving the CACHE_OPEN_READ_END stamp into the success and final failed paths, leaving the compatibility-key retry path unstamped so the retried lookup owns the begin/end pair.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HttpSM.cc: fix cache read end milestone order [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #13325:
URL: https://github.com/apache/trafficserver/pull/13325#issuecomment-4805328798
Cherry-picked to 10.2.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HttpSM.cc: fix cache read end milestone order [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt merged PR #13325:
URL: https://github.com/apache/trafficserver/pull/13325
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HttpSM.cc: fix cache read end milestone order [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on code in PR #13325:
URL: https://github.com/apache/trafficserver/pull/13325#discussion_r3470775788
##########
src/proxy/http/HttpSM.cc:
##########
@@ -2665,6 +2665,11 @@ HttpSM::state_cache_open_read(int event, void *data)
ink_assert(server_entry == nullptr);
ink_assert(t_state.cache_info.object_read == nullptr);
+ // Record the cache open-read completion before state handling can advance
+ // into cache serving and stamp later transaction milestones.
+ ATS_PROBE1(milestone_cache_open_read_end, sm_id);
+ milestones[TS_MILESTONE_CACHE_OPEN_READ_END] = ink_get_hrtime();
+
Review Comment:
I thought similar. Setting this milestone in the beginning of `CACHE_EVENT_OPEN_READ` case seems makes more sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HttpSM.cc: fix cache read end milestone order [trafficserver]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13325:
URL: https://github.com/apache/trafficserver/pull/13325#discussion_r3470728104
##########
src/proxy/http/HttpSM.cc:
##########
@@ -2665,6 +2665,11 @@ HttpSM::state_cache_open_read(int event, void *data)
ink_assert(server_entry == nullptr);
ink_assert(t_state.cache_info.object_read == nullptr);
+ // Record the cache open-read completion before state handling can advance
+ // into cache serving and stamp later transaction milestones.
+ ATS_PROBE1(milestone_cache_open_read_end, sm_id);
+ milestones[TS_MILESTONE_CACHE_OPEN_READ_END] = ink_get_hrtime();
+
Review Comment:
Stamping TS_MILESTONE_CACHE_OPEN_READ_END unconditionally at function entry changes behavior for the compatibility-key retry path (CACHE_EVENT_OPEN_READ_FAILED + cache_try_compat_key_read). In that path the function calls do_cache_lookup_and_read(), which re-stamps TS_MILESTONE_CACHE_OPEN_READ_BEGIN; with this change, BEGIN can become later than END (and if the txn aborts before the retry completes, the final milestone set can remain inconsistent). Consider stamping CACHE_OPEN_READ_END inside each switch case, *after* the retry decision in the FAILED case, but still before any call_transact_and_set_next_state()/API callout that can advance and stamp later milestones.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org