bneradt opened a new pull request, #13791: URL: https://github.com/apache/trafficserver/pull/13791
When stale_response refreshes a stale object in the background, it replays the fetched response into the cache through a server intercept. The intercept wrote the body in 64 KiB slices and only wrote the next slice from a VCONN_WRITE_READY callback. If that callback was missed, nothing else resumed the write. The refresh then stalled after the first slice until the transaction timed out, and ATS could commit the truncated body to the cache as a fresh object. This patch removes that dependency. The intercept now moves the whole buffered body into the output buffer before arming the write, and it arms the write with the exact body length instead of INT_MAX followed by a length correction. The write then finishes as the consumer drains the buffer. Peak memory stays the same, because each body chunk is released as it is copied. If a chunk cannot be copied, the intercept now closes the connection rather than leaving the write hanging. This patch also adds an AuTest that refreshes a body larger than one slice and checks that the complete new response is served from the cache. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
