bneradt opened a new pull request, #13926: URL: https://github.com/apache/trafficserver/pull/13926
Adding a field to a header whose tail field block is full walks the deleted-slot free list for a slot after the field's last duplicate. Each step resolves a slot number by walking the field block chain, so one add costs free slots times blocks. A response header carrying thousands of blocks and thousands of free slots below its last Set-Cookie pins a net thread for seconds on each Set-Cookie a plugin adds, which shows up as large CPU growth and tail latency. This patch keeps the free list in descending slot order, so its head is the only slot worth checking: it is reused if it lies past the last duplicate, and otherwise the field is appended as before. A deleted slot above the head is pushed onto the list; any other delete marks the list uninitialized, and the next add that needs a slot rebuilds it with one block scan, which already yields that order. The header sanity check now also verifies the ordering. This is a follow-up to #13455. 🤖 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]
