Fix double header sending on error#3833
Merged
roman-khimov merged 2 commits intomasterfrom Feb 19, 2026
Merged
Conversation
Previously, if an error occurred, it was not saved and was ignored because the receiver was by value. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
There were situations when, upon receiving an object, the header had already been written, but an error occurred while writing chunks, when some of them had already been written. In this case, the system would start searching on other nodes. Then the header would be written again, resulting in an error: `unexpected message instead of chunk part: *object.GetResponse_Body_Init_`. However, even if we allow the chunks to continue to be written without writing the header, the stream will already be corrupted by the chunks that have already been written locally. Therefore, an error must be returned immediately when writing chunks. Closes #3807. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3833 +/- ##
==========================================
+ Coverage 25.52% 25.55% +0.03%
==========================================
Files 669 669
Lines 42940 42941 +1
==========================================
+ Hits 10959 10973 +14
+ Misses 30975 30965 -10
+ Partials 1006 1003 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
roman-khimov
approved these changes
Feb 19, 2026
carpawell
approved these changes
Feb 19, 2026
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.
Closes #3807.