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

Dont treat popped conn.close() as failure in state change callback #1773

Merged
merged 1 commit into from
Apr 2, 2019

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Mar 31, 2019

Small change to KafkaClient's state_change_callback to attempt to avoid re-fetching Metadata or increasing bootstrap failure count after an intentional disconnect / conn.close()


This change is Reviewable

@@ -419,10 +424,12 @@ def close(self, node_id=None):
with self._lock:
if node_id is None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while the code is relatively clear, it'd be nice if the docstring stated that node_id=None results in closing all broker connections. The docstring implies it, but doesn't say that explicitly.

@dpkp dpkp merged commit 51313d7 into master Apr 2, 2019
@dpkp dpkp deleted the popped_conn_close branch April 2, 2019 02:38
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.

2 participants