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

Timeout on broker metadata sending failure #577

Conversation

MichalMazurek
Copy link
Contributor

What do these changes do?

Add support for asyncio.TimeoutError on requesting metadata during bootstrap and metadata update.

Are there changes in behavior for the user?

No changes

Related issue number

Issue #576

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

576.bugfix
Added handling `asyncio.TimeoutError` on metadata request to broker and metadata update.
@codecov
Copy link

codecov bot commented Jan 31, 2020

Codecov Report

Merging #577 into master will increase coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #577      +/-   ##
==========================================
+ Coverage   98.18%   98.38%   +0.19%     
==========================================
  Files          31       31              
  Lines        5017     5017              
==========================================
+ Hits         4926     4936      +10     
+ Misses         91       81      -10
Impacted Files Coverage Δ
aiokafka/client.py 98.08% <100%> (+0.95%) ⬆️
aiokafka/conn.py 99.11% <0%> (ø) ⬆️
aiokafka/consumer/group_coordinator.py 99.16% <0%> (+0.13%) ⬆️
aiokafka/producer/sender.py 99.54% <0%> (+0.68%) ⬆️
aiokafka/consumer/consumer.py 98.76% <0%> (+0.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96159c6...335a99d. Read the comment docs.

@MichalMazurek
Copy link
Contributor Author

Hi! Is anyone interested in merging it? :)

@tvoinarovskyi
Copy link
Member

Looks great, thanks!

@@ -292,7 +292,7 @@ def get_random_node(self):

try:
metadata = await conn.send(metadata_request)
except KafkaError as err:
except (KafkaError, asyncio.TimeoutError) as err:
Copy link
Member

Choose a reason for hiding this comment

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

I kind of wander why I did not use client.send here. That would handle the issue correctly... Probably we should also close the connection here as we do in send, but that is another enhancement ))

@tvoinarovskyi tvoinarovskyi merged commit bea8d12 into aio-libs:master Feb 14, 2020
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