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

Producer block may block forever #491

Closed
jonyhy96 opened this issue Mar 23, 2021 · 4 comments · Fixed by #492
Closed

Producer block may block forever #491

jonyhy96 opened this issue Mar 23, 2021 · 4 comments · Fixed by #492

Comments

@jonyhy96
Copy link
Contributor

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 before case 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

@jonyhy96
Copy link
Contributor Author

/cc @freeznet @wolfstudy
I would like to fix this bug by add time out guarantee on RequestOnCnx
BTW, Can i join the slack of this project to get in touch with the mainainers?

@freeznet
Copy link
Contributor

@jonyhy96 thanks, PR are always welcome ;)

Also, the slack is free to join:

The Slack instance is at https://apache-pulsar.slack.com/
You can self-register at https://apache-pulsar.herokuapp.com/

And you can join #dev-go channel to get in touch with go devs and users.

@jonyhy96
Copy link
Contributor Author

https://apache-pulsar.slack.com/ shows me hy352144278@gmail.com doesn’t have an account on this workspace. and https://apache-pulsar.herokuapp.com/ seems doesn't have #dev-go channel 😅

@freeznet
Copy link
Contributor

@jonyhy96 You can browse all available channels from the plus icon next to Channels dropdown item on your Slack. Also I have sent an invitation to your email hy352144278@gmail.com as well.

wolfstudy pushed a commit that referenced this issue Jun 2, 2021
Signed-off-by: jonyhy96 <hy352144278@gmail.com>

Fixes #491 

### Motivation

see #491

### Modifications

add timeout guarantee to RequestOnCnx

### Verifying this change

- [x] Make sure that the change passes the CI checks.
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 a pull request may close this issue.

2 participants