Skip to content

Implement stalled connection detection and handling in BrokerConnection - #55

Merged
hupe1980 merged 2 commits into
mainfrom
fix/redpanda-fetch-session-close
Sep 23, 2026
Merged

hupe1980 merged 2 commits into
mainfrom
fix/redpanda-fetch-session-close

Conversation

@hupe1980

Copy link
Copy Markdown
Owner
  • Introduced stalled_connection_error to handle errors when a connection is stalled due to unanswered requests.
  • Added logic to detect stalled connections in BrokerConnection, closing the connection if a request remains unanswered beyond a grace period.
  • Enhanced tests to verify the behavior of the connection when requests are stalled, ensuring that the connection closes and retries occur as expected.
  • Updated ShareConsumer to notify when assignments are installed and to wait for assignments during polling.
  • Implemented a retry mechanism for joining the coordinator in ShareConsumer, handling common coordinator errors gracefully.
  • Added functionality to close share sessions with a final-epoch ShareAcknowledge, ensuring proper cleanup of sessions.
  • Updated tests to validate the behavior of share consumers and producers in scenarios involving connection stalls and session closures.

fixes #54

- Introduced `stalled_connection_error` to handle errors when a connection is stalled due to unanswered requests.
- Added logic to detect stalled connections in `BrokerConnection`, closing the connection if a request remains unanswered beyond a grace period.
- Enhanced tests to verify the behavior of the connection when requests are stalled, ensuring that the connection closes and retries occur as expected.
- Updated `ShareConsumer` to notify when assignments are installed and to wait for assignments during polling.
- Implemented a retry mechanism for joining the coordinator in `ShareConsumer`, handling common coordinator errors gracefully.
- Added functionality to close share sessions with a final-epoch `ShareAcknowledge`, ensuring proper cleanup of sessions.
- Updated tests to validate the behavior of share consumers and producers in scenarios involving connection stalls and session closures.
@hupe1980
hupe1980 merged commit e6b154c into main Sep 23, 2026
30 checks passed
@hupe1980
hupe1980 deleted the fix/redpanda-fetch-session-close branch September 23, 2026 18:27
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.

Closing a consumer on a shared KrafkaClient stalls the connection against Redpanda

1 participant