server: Preserve the RPC status when a compressed RPC ends before response compressor setup. - #9314
Open
RayanAlsalemi wants to merge 2 commits into
Open
Conversation
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9314 +/- ##
==========================================
- Coverage 83.22% 83.12% -0.11%
==========================================
Files 423 423
Lines 35139 35251 +112
==========================================
+ Hits 29244 29301 +57
- Misses 4400 4437 +37
- Partials 1495 1513 +18
🚀 New features to boost your workflow:
|
RayanAlsalemi
force-pushed
the
fix/send-compressor-cancellation-status
branch
from
August 13, 2026 07:59
fe54e06 to
259972b
Compare
Contributor
|
@mbissa : I've categorized this PR with a "bug" label. But we should check the behavior of the other language implementations before proceeding with this. |
Author
|
I've updated the PR so the transport records the first close status. If compressor setup runs after the stream is already done, it can return that status directly instead of checking |
RayanAlsalemi
force-pushed
the
fix/send-compressor-cancellation-status
branch
from
August 15, 2026 13:34
3300378 to
3815870
Compare
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.
Fixes #9313
A compressed RPC can end after the server receives the request headers but before grpc-go sets the response compressor. When that happens,
SetSendCompressreturns a "headers sent or stream done" error and the server stats reportInternaleven if the stream was canceled or its deadline expired.This change records the first status used to close the transport stream. If
SetSendCompressruns after the stream is done, it returns that status. If the headers were already sent, or there is no recorded close status, it keeps the existing error.RELEASE NOTES: