-
Notifications
You must be signed in to change notification settings - Fork 346
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
Producer block may block forever #491
Comments
/cc @freeznet @wolfstudy |
@jonyhy96 thanks, PR are always welcome ;) Also, the slack is free to join:
And you can join #dev-go channel to get in touch with go devs and users. |
https://apache-pulsar.slack.com/ shows me |
@jonyhy96 You can browse all available channels from the plus icon next to |
Signed-off-by: jonyhy96 <[email protected]> Fixes #491 ### Motivation see #491 ### Modifications add timeout guarantee to RequestOnCnx ### Verifying this change - [x] Make sure that the change passes the CI checks.
Expected behavior
If producer.Close are called,it will close within configured OperationTimeout
Actual behavior
producer.Close may block forever and won't time out after configured OperationTimeout
Steps to reproduce
Just run the perf program for a while and send SIGINT or ctrl+c to it. This situation may be triggered.
This is because the callback of producer.SendAsyc contains a send behavior on a channel which under the same scope with stopCh. When we trigger producer.Close, if
case <-stop:
happens beforecase latency := <-ch:
, it will block forever because it may be block at here and RequestOnCnx has no time out guarantee.System configuration
Pulsar version: any
The text was updated successfully, but these errors were encountered: