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

OffsetManager should report error ErrUnknownTopicOrPartition #706

Closed
kanekv opened this issue Jul 15, 2016 · 3 comments
Closed

OffsetManager should report error ErrUnknownTopicOrPartition #706

kanekv opened this issue Jul 15, 2016 · 3 comments

Comments

@kanekv
Copy link

kanekv commented Jul 15, 2016

ErrUnknownTopicOrPartition at https://github.com/Shopify/sarama/blob/master/offset_manager.go#L460
should be logged and probably considered an error (propagate error back to Close()?)

Versions

Sarama Version: master
Kafka Version: 0.10
Go Version: 1.6.2

@eapache
Copy link
Contributor

eapache commented Jul 18, 2016

Off the top of my head, I think it depends if you have topic auto-create enabled on your broker? If you do, then retrying ErrUnknownTopicOrPartition is correct because the topic will have been created by the time you try again?

@kanekv
Copy link
Author

kanekv commented Jul 20, 2016

@eapache you are right, it has use case when auto create topic is enabled. I think reporting the error is more correct behavior though. It could be behind the setting, with error reporting on by default. What you think?
Otherwise when auto create topic is not enabled it gets stuck forever in .Close call without any useful logs.

@eapache
Copy link
Contributor

eapache commented Jul 23, 2016

It's actually easy enough to report the error and still retry so that should handle all the cases nicely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants