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

PartitionConsumer.Close() behavior mismatch #1703

Closed
greysond opened this issue May 13, 2020 · 4 comments
Closed

PartitionConsumer.Close() behavior mismatch #1703

greysond opened this issue May 13, 2020 · 4 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@greysond
Copy link
Contributor

Apologies if I'm misreading this, but in the docs for the PartitionConsumer, it states that the Close() method will "initiate a shutdown just like AsyncClose, drain the Messages channel, harvest any errors & return them to the caller."

I'm looking at the method here and it doesn't seem to be draining the messages channel.

@greysond
Copy link
Contributor Author

I can definitely open a PR for this, but I just wanted to make sure I wasn't missing something.

@kjgorman
Copy link
Contributor

This behaviour was removed in #1156 — probably the godoc is just stale.

@harshana-pickme
Copy link

harshana-pickme commented Dec 17, 2020

This behaviour was removed in #1156 — probably the godoc is just stale.

What is the behaviour now? I'm using 1.27.2, Here's what I observe

  1. create a PartitionConsumer in one goroutine.
  2. Before it starts reading the input channel, another goroutine call PartitionConsumer.Close() (due to quick rebalancing of another group consumer)
  3. When the first goroutine reaches the code which reads the channel ("for" loop), I'm expecting it to terminate as the ParitionConsumer is now closed. But it does not terminate or read from channel. It gets stuck there forever.

Please enlighten us on this behaviour.
How can I close the channel after closing the PartitionConsumer ?

@ghost
Copy link

ghost commented Mar 17, 2021

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@ghost ghost added the stale Issues and pull requests without any recent activity label Mar 17, 2021
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

3 participants