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

[CORE-4878] [v23.3.x] http: change stop() to shutdown() on TLS errors in client (manual backport) #20589

Merged

Conversation

WillemKauf
Copy link
Contributor

Previously, we would call client::stop() upon encountering TLS errors in client::send_some(), client::recv_some() and client::make_request(). These stopped clients would not be removed from the client_pool, resulting in erroneous use for future requests.

Change the default behavior from calling stop() to shutdown(), which leaves client in a usable state for the future, after a connection is re-attempted.

Also improve logging around TLS errors, _connect_gate, and add checks around the state of _stopped in client::make_request() and get_connected().

(cherry picked from commit b6621fe)

Fixes #20588

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
  • v24.1.x
  • v23.3.x
  • v23.2.x

Release Notes

  • none

Previously, we would call `client::stop()` upon encountering TLS
errors in `client::send_some()`, `client::recv_some()` and
`client::make_request()`. These stopped `client`s would not be
removed from the `client_pool`, resulting in erroneous use for
future requests.

Change the default behavior from calling `stop()` to `shutdown()`,
which leaves `client` in a usable state for the future, after a connection
is re-attempted.

Also improve logging around TLS errors, `_connect_gate`, and add
checks around the state of `_stopped` in `client::make_request()`
and `get_connected()`.

(cherry picked from commit b6621fe)
@WillemKauf WillemKauf added the kind/backport PRs targeting a stable branch label Jun 27, 2024
@piyushredpanda piyushredpanda requested a review from dotnwat June 27, 2024 22:23
Copy link
Contributor

@andrwng andrwng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks functionally the same. I'm guessing the conflicts were just from the header for likely.h changing, is that right @WillemKauf ?

@WillemKauf
Copy link
Contributor Author

Looks functionally the same. I'm guessing the conflicts were just from the header for likely.h changing, is that right @WillemKauf ?

Correct, that was the only diff preventing a seamless cherry-pick.

@piyushredpanda
Copy link
Contributor

#20574 and #19789

@piyushredpanda piyushredpanda merged commit 603afbe into redpanda-data:v23.3.x Jun 28, 2024
14 of 17 checks passed
@piyushredpanda piyushredpanda added this to the v23.3.18 milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants