Skip to content

bugfix: race among _connecting and cluster metadata (#2189) #19

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
Jan 20, 2021

Conversation

hackaugusto
Copy link

Port of dpkp#2189

A call to maybe_connect can be performed while the cluster metadata is
being updated. If that happens, the assumption that every entry in
_connecting has metadata won't hold. The existing assert will then
raise on every subsequent call to poll driving the client instance
unusable.

This fixes the issue by ignoring connetion request to nodes that do not
have the metadata available anymore.

Copy link
Member

@ivanyu ivanyu left a comment

Choose a reason for hiding this comment

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

LGTM to the best of my knowledge of the library.

A call to `maybe_connect` can be performed while the cluster metadata is
being updated. If that happens, the assumption that every entry in
`_connecting` has metadata won't hold. The existing assert will then
raise on every subsequent call to `poll` driving the client instance
unusable.

This fixes the issue by ignoring connetion request to nodes that do not
have the metadata available anymore.
@hackaugusto hackaugusto force-pushed the hacka/fix-broker-id-metadata-assert branch from f267998 to 8006e65 Compare January 19, 2021 09:37
@ivanyu ivanyu merged commit 1b95333 into master Jan 20, 2021
@ivanyu ivanyu deleted the hacka/fix-broker-id-metadata-assert branch January 20, 2021 10:47
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