[CORE-14534] k/s/conn_ctx: Ignore exception on input_shutdown#28445
Merged
Conversation
net::connection::wait_for_input_shutdown can throw. It's not very interesting, so just ignore the exception. Signed-off-by: Ben Pope <ben@redpanda.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a rare uncaught exception issue during Kafka connection shutdown by adding exception handling to wait_for_input_shutdown().
Key Changes:
- Added exception handler to ignore exceptions thrown by
net::connection::wait_for_input_shutdown()during connection shutdown
| ssx::background | ||
| = conn->wait_for_input_shutdown() | ||
| .handle_exception([](std::exception_ptr) { | ||
| // ignore |
There was a problem hiding this comment.
The comment 'ignore' is insufficiently explanatory. Consider adding a brief explanation of why exceptions are ignored here, such as 'Exceptions during input shutdown are not actionable and can be safely ignored' to improve code maintainability.
Suggested change
| // ignore | |
| // Exceptions during input shutdown are not actionable and can be safely ignored. |
IoannisRP
approved these changes
Nov 10, 2025
pgellert
approved these changes
Nov 10, 2025
Collaborator
CI test resultstest results on build#75910
|
Collaborator
|
/backport v25.2.x |
Collaborator
|
/backport v25.1.x |
Collaborator
|
/backport v24.3.x |
Contributor
Author
|
/backport v25.2.x |
Contributor
Author
|
/backport v25.1.x |
Contributor
Author
|
/backport v24.3.x |
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.
net::connection::wait_for_input_shutdowncan throw.It's not very interesting, so just ignore the exception.
Backports Required
Release Notes
Improvements