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

Avoid treating an OpenSSL error as a permanent error #4294

Merged
merged 3 commits into from
Jun 14, 2023

Conversation

emasab
Copy link
Collaborator

@emasab emasab commented May 26, 2023

and treat unclean SSL closes as normal ones.

When SSL connections are closed without close_notify, in OpenSSL 3.x (librdkafka 2.0.2) a new type of error is set and it was interpreted as permanent in librdkafka. It can cause a different issue depending on the RPC. If received when waiting for OffsetForLeaderEpoch response (librdkafka 2.1.x), it triggers an offset reset following the configured policy. Solved by treating SSL errors as transport errors and by setting an OpenSSL flag that allows to treat unclean SSL closes as normal ones. These types of errors can happen it the other side doesn't support close_notify or if there's a TCP connection reset.

@emasab emasab force-pushed the dev_fix_4293_ssl_offset_reset branch 2 times, most recently from b5e7c53 to a0a5c15 Compare May 26, 2023 08:41
@emasab emasab marked this pull request as draft May 26, 2023 08:43
doesn't cause an offset reset
and treat unclean SSL  closes as normal ones

fixes #4293
@emasab
Copy link
Collaborator Author

emasab commented Jun 1, 2023

src/rdkafka_request.c Show resolved Hide resolved
Copy link
Member

@pranavrth pranavrth left a comment

Choose a reason for hiding this comment

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

LGTM!

@emasab emasab merged commit 3e39a9e into master Jun 14, 2023
@emasab emasab deleted the dev_fix_4293_ssl_offset_reset branch June 14, 2023 08:19
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.

None yet

2 participants