refactor(vanilla-epoll): extract shared emit_xcache helper for io_uring parity#968
Open
enghitalo wants to merge 1 commit into
Open
refactor(vanilla-epoll): extract shared emit_xcache helper for io_uring parity#968enghitalo wants to merge 1 commit into
enghitalo wants to merge 1 commit into
Conversation
…-Cache framing Fold the two inlined X-Cache response framings (crud GET hit/miss) into one emit_xcache helper — byte-identical output, and identical to the vanilla-io_uring twin's emit_xcache, so both entries share one audited framing and diff cleanly. No behavior or performance change (verified: crud GET MISS/HIT bytes unchanged). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
/benchmark -f vanilla-epoll |
Contributor
|
👋 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Small maintainability refactor, paired with the
vanilla-io_uringconvergence PR.vanilla-epollinlined the crud X-Cache response framing in two places (thecrudGET cache hit and miss paths). This folds both into oneemit_xcachehelper.The helper is byte-identical to the code it replaces, and identical to the
emit_xcachenow used by thevanilla-io_uringtwin — so both entries share one audited X-Cache framing and diff cleanly.vanilla-epollremains the performance reference; this only removes duplication.Change
emit_xcache(mut out, ctype, body, cache)next toemit/write_resp.start_crud_get(HIT) andrender_crud_get(MISS).No behavior or performance change.
Validation
Verified against a seeded Postgres that the
crudGET MISS and HIT responses are byte-for-byte unchanged (and identical to thevanilla-io_uringtwin, whose full-route byte-diff is in its PR).🤖 Generated with Claude Code