Repository navigation
fix(service): record single-chunk egress only when response body is polled - #241
Merged
Merged
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummarySingle-chunk responses now count outgoing bytes when the body is polled, rather than when the handler returns.
Reviews (1) · Last reviewed commit: "fix(service): record single-chunk egress..." · Reviewed by Greptile |
shikhar
force-pushed
the
fix/single-chunk-egress-accounting
branch
from
December 5, 2026 17:42
04fcaa0 to
7b7d706
Compare
shikhar
force-pushed
the
fix/single-chunk-egress-accounting
branch
from
December 5, 2026 19:42
7b7d706 to
6877543
Compare
Merged
shikhar
pushed a commit
that referenced
this pull request
Dec 5, 2026
## 🤖 New release * `cachey`: 0.13.7 -> 0.13.8 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.13.8](0.13.7...0.13.8) - 2026-12-05 ### Fixed - *(service)* record single-chunk egress only when response body is polled ([#241](#241)) - *(object_store)* refund unstarted attempt credits and gate hedge outcomes ([#240](#240)) ### Other - *(deps)* upgrade dependencies ([#242](#242)) - drop nightly Cargo cooldown requirement and soften Cargo.lock guidance ([#237](#237)) - pin rust-dependency-cooldown workflow to commit SHA ([#236](#236)) - use shared rust-dependency-cooldown workflow ([#234](#234)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
SingleChunkBodyimplementinghttp_body::Body(Data = Bytes,Error = Infallible) insrc/service/routes.rsso single-chunk responses record egress bytes inpoll_frame()rather than eagerly in the/fetchhandler before Hyper polls the body.is_end_stream()and exactsize_hint()onSingleChunkBody(matchinghttp_body_util::Full<Bytes>) to preserve PR perf(server): tune HTTP/2 settings, single-chunk response framing, and disk decode #231's HTTP/2END_STREAM-on-DATAframing with the same singleUnsyncBoxBodyallocation asaxum::body::Body::from(Bytes).SingleChunkBodyin both theFetchPlan::SingleandFetchPlan::Multiearly-EOF fast paths, restoring the PR fix(service): count egress only for body bytes sent #188 invariant that dropped/unpolled response bodies do not count toward egress throughput.Verification
cargo +nightly fmtcargo clippy --locked --all-features --all-targets -- -D warnings --allow deprecatedcargo deny checkcargo nextest run --locked(router-level test coveringHEAD, droppedGET, and readGETacross both single-chunk and early-EOF fast paths, plus existing HTTP/2END_STREAMframing tests)Closes #239