Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud_storage_clients: use appropriate beast error for end of stream #15743

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

nvartolomei
Copy link
Contributor

No functionality changes except the log messages. While testing Redpanda against real S3 endpoint I got concerned by log messages looking like this: Server disconnected: 'unexpected eof in body [beast.http:26]', retrying HTTP request.

As a result, spent 3 hours debugging why S3 would close connection mid-message. The problem was that we were using a bit of an inappropriate message to indicate cleanly closed connection. Use a more appropriate error code to avoid confusion in the future.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

No functionality changes except the log messages. While testing Redpanda
against real S3 endpoint I got concerned by log messages looking like
this: `Server disconnected: 'unexpected eof in body [beast.http:26]',
retrying HTTP request`.

As a result, spent 3 hours debugging why S3 would close connection
mid-message. The problem was that we were using a bit of an
inappropriate message to indicate cleanly closed connection. Use a more
appropriate error code to avoid confusion in the future.
@nvartolomei
Copy link
Contributor Author

/dt

Beast handles incomplete headers and errors out with partial message
error code. Report end of stream error only when it is actually the
case, i.e. no bytes received at all.
@nvartolomei
Copy link
Contributor Author

/dt

@vbotbuildovich
Copy link
Collaborator

@nvartolomei nvartolomei marked this pull request as ready for review December 19, 2023 10:58
@nvartolomei nvartolomei merged commit e9e6112 into redpanda-data:dev Dec 19, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants