Skip to content

[CORE-14534] k/s/conn_ctx: Ignore exception on input_shutdown#28445

Merged
BenPope merged 1 commit into
redpanda-data:devfrom
BenPope:core-14534
Nov 10, 2025
Merged

[CORE-14534] k/s/conn_ctx: Ignore exception on input_shutdown#28445
BenPope merged 1 commit into
redpanda-data:devfrom
BenPope:core-14534

Conversation

@BenPope

@BenPope BenPope commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

net::connection::wait_for_input_shutdown can throw.

It's not very interesting, so just ignore the exception.

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

Release Notes

Improvements

  • kafka/server: Fix rare uncaught exceptional future on connection shutdown

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>
@BenPope BenPope requested a review from a team November 10, 2025 12:03
@BenPope BenPope self-assigned this Nov 10, 2025
@BenPope BenPope requested review from Copilot and pgellert and removed request for a team November 10, 2025 12:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copilot AI Nov 10, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@BenPope BenPope changed the title [CORE-14534] k/s/connection_context: Ignore exception on input_shutdown [CORE-14534] k/s/conn_ctx: Ignore exception on input_shutdown Nov 10, 2025
@vbotbuildovich

Copy link
Copy Markdown
Collaborator

CI test results

test results on build#75910
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
ReplicatedMetastoreTest TestBasicRemoveTopics unit https://buildkite.com/redpanda/redpanda/builds/75910#019a6da6-f9aa-4e47-8f1c-54cb5f079ac0 FAIL 0/1
TieredStorageTest test_tiered_storage {"cloud_storage_type_and_url_style": [1, "path"], "test_case": {"name": "(TS_Read == True, TS_Timequery == True)"}} integration https://buildkite.com/redpanda/redpanda/builds/75910#019a6dc1-7e19-4e47-8a4a-4a787a96f426 FLAKY 20/21 upstream reliability is '99.76415094339622'. current run reliability is '95.23809523809523'. drift is 4.52606 and the allowed drift is set to 50. The test should PASS https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=TieredStorageTest&test_method=test_tiered_storage
WriteCachingFailureInjectionE2ETest test_crash_all {"use_transactions": false} integration https://buildkite.com/redpanda/redpanda/builds/75910#019a6dc1-7e1b-4ff4-929e-51096f4ee304 FLAKY 18/21 upstream reliability is '91.52872444011685'. current run reliability is '85.71428571428571'. drift is 5.81444 and the allowed drift is set to 50. The test should PASS https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=WriteCachingFailureInjectionE2ETest&test_method=test_crash_all

@BenPope BenPope merged commit 9bd65b9 into redpanda-data:dev Nov 10, 2025
19 checks passed
@vbotbuildovich

Copy link
Copy Markdown
Collaborator

/backport v25.2.x

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

/backport v25.1.x

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

/backport v24.3.x

@BenPope

BenPope commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

/backport v25.2.x

@BenPope

BenPope commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

/backport v25.1.x

@BenPope

BenPope commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

/backport v24.3.x

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.

5 participants