-
Notifications
You must be signed in to change notification settings - Fork 1.4k
No infinite loops during metadata requests, invalidate metadata more, exception hierarchy #91
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
Closed
Closed
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
fa351d9
Add error hierarchy, remove client infinite loop
turtlesoupy 7d7a587
Better error handling on broker exception, flake8 fixes
turtlesoupy d842c78
Add back the global load metadata on client initialization
turtlesoupy 5cccd63
No exception for empty partitions, fix topic metadata reset
turtlesoupy 0dd8c3f
Change exception names, make a new "KafkaRequestError"
turtlesoupy ec23d94
Check for socket status on read as well as send
turtlesoupy ae44207
Propagate error immediately if dirty
turtlesoupy 6fe9dce
Enable absolute imports for modules using Queue.
40db4e1
Allow customizing socket timeouts.
rdiomar 6d691b9
Read the correct number of bytes from kafka.
rdiomar be564d9
* Guarantee reading the expected number of bytes from the socket ever…
rdiomar d7387cd
Allow None timeout in FetchContext even if block is False
rdiomar a359a13
Reset consumer fields to original values rather than defaults in Fetc…
rdiomar 6480712
SimpleConsumer flow changes:
rdiomar 8f301af
Remove SimpleConsumer queue size limit since it can cause the iterator
rdiomar 9d9c209
Add buffer_size param description to docstring
rdiomar e5ed16b
Add iter_timeout option to SimpleConsumer. If not None, it causes the…
rdiomar b2219ab
Add comments and maintain 80 character line limit
rdiomar 21b46b1
Add and fix comments to protocol.py
rdiomar f332985
Add note about questionable error handling while decoding messages.
rdiomar c9205fe
Fix unit tests.
rdiomar 165eb8b
Style fix for imports
rdiomar ca59b2f
Fix seek offset deltas
rdiomar 2a55bd3
Raise a ConnectionError when a socket.error is raised when receiving …
rdiomar 4ba0943
Fix client error handling
rdiomar 02932af
Add a limit to fetch buffer size, and actually retry requests when fe…
rdiomar 7c6e519
Handle starting/stopping Kafka brokers that are already started/stopp…
rdiomar f5ffd85
Remove unnecessary brackets
rdiomar 33551ba
Fix client and consumer params in integration tests
rdiomar 78f7caa
Add tests for limited and unlimited consumer max_buffer_size
rdiomar dbc3d80
Make kafka brokers per-test in failover integration tests
rdiomar 36c3930
Add object type and ID to message prefix in fixtures output for easie…
rdiomar 3a12e5c
Use the same timeout when reinitializing a connection
rdiomar 11b09c1
Handle dirty flag in conn.recv()
rdiomar adcfff0
Remove unnecessary method
rdiomar 283ce22
Skip snappy/gzip tests if they're not available
rdiomar 27ae269
Some cleanup and easier to read test fixture output
rdiomar cf4d220
Change BufferUnderflowError to ConnectionError in conn._read_bytes()
rdiomar 6899063
Change log.error() back to log.exception()
rdiomar adb7a63
Check for socket status on read as well as send
turtlesoupy 4bf32b9
Propagate error immediately if dirty
turtlesoupy 9b7d863
Add error hierarchy, remove client infinite loop
turtlesoupy ab79531
Better error handling on broker exception, flake8 fixes
turtlesoupy fbec8ff
No exception for empty partitions, fix topic metadata reset
turtlesoupy 1118bbd
Change exception names, make a new "KafkaRequestError"
turtlesoupy 88b8ff3
Fix test errors after rebase
turtlesoupy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise here and the client is unable to work with topics that are in perfectly good shape. Your client might not even care about topic with unassigned partitions
You could let if flow, any further call for this topic will generate a call to this function specifically for that topic. It will eventually fail if you still don't have a leader for the said partitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point, this doesn't work well for wildcard metadata queries. I like the strategy of throwing an exception on demand if you try to send to a bad topic (which is currently done if leader is -1). Let me see what I can do