Skip to content

Comments

Fix double header sending on error#3833

Merged
roman-khimov merged 2 commits intomasterfrom
unexpected-message-instead-of-chunk-part
Feb 19, 2026
Merged

Fix double header sending on error#3833
roman-khimov merged 2 commits intomasterfrom
unexpected-message-instead-of-chunk-part

Conversation

@End-rey
Copy link
Contributor

@End-rey End-rey commented Feb 19, 2026

Closes #3807.

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
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.55%. Comparing base (c9370f3) to head (3ee9169).
⚠️ Report is 3 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roman-khimov roman-khimov merged commit 52149c0 into master Feb 19, 2026
25 of 26 checks passed
@roman-khimov roman-khimov deleted the unexpected-message-instead-of-chunk-part branch February 19, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"unexpected message instead of chunk part" when GETting an object

3 participants