-
Notifications
You must be signed in to change notification settings - Fork 1.4k
TopicAndPartition fix when partition leader = -1 #109
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
Changes from all commits
6189bd4
9e2778e
8bcf0f0
72fdf39
b253166
5e5d709
828133c
19646b1
017f484
51246fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,15 +74,15 @@ class KafkaError(RuntimeError): | |
pass | ||
|
||
|
||
class KafkaRequestError(KafkaError): | ||
class KafkaUnavailableError(KafkaError): | ||
pass | ||
|
||
|
||
class KafkaUnavailableError(KafkaError): | ||
class BrokerResponseError(KafkaError): | ||
pass | ||
|
||
|
||
class BrokerResponseError(KafkaError): | ||
class LeaderUnavailableError(KafkaError): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should stay close to the mainline scala client error types: so maybe: LeaderNotAvailableError looking at exception classes in and error codes in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I juggled with that idea but none of the existing exception really maps 1:1 now so I preferred keeping the current naming convention (LeaderUnavailableError vs LeaderNotAvailableError) instead of having this specific one different. |
||
pass | ||
|
||
|
||
|
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.
This can be
if key not in self.topics_to_brokers:
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.
No because I want to handle cases where key is not in dict and when the value at key is None. Get returns None by default in both cases which suits my need.
Should I clarify the comment because that is what it is supposed to say.