Closed bneradt closed 2 years ago
Oh, I see. With #8484, need_to_revalidate is no longer ever called: https://github.com/apache/trafficserver/blob/c0e3ddb985689ae2f71ca486421caf67cc83cfc3/proxy/http/HttpTransact.cc#L2702
@serrislew : I think we maybe want to call need_to_revalidate here? https://github.com/apache/trafficserver/pull/8484/files#diff-7f286e5169bc2d28c13f1ceaf3bb482b36cdb0743fbac4040fd4cd5a9c0897c1R1973
(That doesn't fix this issue, but it's an observation I'm making while looking at the code.)
After merging in this PR: https://github.com/apache/trafficserver/pull/8545
CI now fails.
This is the sequence of events that led to this:
It looks like #8484 breaks the patch in #8545 by causing the
TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE
to fire before some of the revalidation checks are performed.Here are the logs for a relevant transaction:
Notice that the behavior of ATS is still correct: the send_revalidate flag is true. But the
TSHttpTxnCacheLookupStatusGet
is called before this state is detected, therefore the plugin gets the wrong status flag (fresh instead of a miss).It looks like with #8484, the
need_to_revalidate
revalidate function is no longer called beforeTSHttpTxnCacheLookupStatusGet
is called, and thus thecache_hit_but_revalidate
flag isn't set yet.