Skip to content

change_subscription warning log to info #1132

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

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

Artimi
Copy link
Contributor

@Artimi Artimi commented Jun 26, 2017

When we are using subscription by pattern change subscription is
called every metadata update even when nothing changes. It logs
warning every time topics are not changed. It creates unnecessary
noise in logs. I changed it to level info so it can be easily ignored
(I want to see only warnings from kafka client). Do you think this is
a right approach or I should check in ConsumerCoordinator._handle_metadata_update
that no topics has changed and not call change_subscription in
this case? I would then need to change it in aiokafka too because I'm
using that.

@jeffwidman jeffwidman requested a review from dpkp July 1, 2017 10:48
@jeffwidman
Copy link
Contributor

@dpkp how much extra work would it save to skip calling change_subscription if nothing actually changed? Feels like that's an optimization probably worth making unless you're trying to guard against edge-cases.

And I agree, this log should be info (I'd even go as far as making it debug) if nothing actually changed.

@Artimi Artimi force-pushed the change-subscription-warning-to-info branch from 667fee6 to a097be2 Compare July 3, 2017 14:40
@Artimi
Copy link
Contributor Author

Artimi commented Jul 3, 2017

@jeffwidman I changed it so we don't call change_subscription when it is not needed. I don't think that this can break something but lets see how tests will turn out.

@dpkp
Copy link
Owner

dpkp commented Jul 4, 2017

I would prefer to keep the log level at warning. Otherwise, this is a good improvement. +1

When we are using subscription by pattern change subscription is
called every metadata update even when nothing changes. This PR
ensures that change subscription is called only when set of topics
changes.
@Artimi Artimi force-pushed the change-subscription-warning-to-info branch from a097be2 to 7adc692 Compare July 5, 2017 08:50
@Artimi
Copy link
Contributor Author

Artimi commented Jul 5, 2017

@dpkp level changed back to warning

@dpkp
Copy link
Owner

dpkp commented Jul 7, 2017

Thanks!

88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Aug 25, 2017
When we are using subscription by pattern change subscription is
called every metadata update even when nothing changes. This PR
ensures that change subscription is called only when set of topics
changes.
88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Aug 25, 2017
When we are using subscription by pattern change subscription is
called every metadata update even when nothing changes. This PR
ensures that change subscription is called only when set of topics
changes.
88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Oct 6, 2017
When we are using subscription by pattern change subscription is
called every metadata update even when nothing changes. This PR
ensures that change subscription is called only when set of topics
changes.
88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Jul 16, 2018
When we are using subscription by pattern change subscription is
called every metadata update even when nothing changes. This PR
ensures that change subscription is called only when set of topics
changes.
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.

3 participants