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

asynchronized send timeout checking without pending queue lock #460

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

wuYin
Copy link
Contributor

@wuYin wuYin commented Feb 3, 2021

Fixes #458

Motivation

For current producer, send timeout checking triggered by interval batch flush
If connection closed, the producer eventloop will blocked to reconnect to broker, lead to batch flush and send timeout checking take no effective, java-client timer did effective in this situation

Modifications

Asynchronized send timeout by running in independent goroutine until producer closed, and without a pending queue lock

Verifying this change

  • Make sure that the change passes the CI checks.

Others

Without pending queue lock, the send timeout checking gets more complicated, I don't know if it's worth it for performance.

@wolfstudy wolfstudy added this to the 0.4.0 milestone Feb 9, 2021
@wolfstudy wolfstudy merged commit 0e76dc2 into apache:master Feb 9, 2021
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.

MaxReconnectToBroker caused infinite sendTimeout failure even after broker recovered
3 participants