-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
KAFKA-14446: code style improvements for broker-to-controller forwarding #13001
Conversation
…forwarding patch Original patch: https://github.com/apache/kafka/pull/12961/files#
core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala
Outdated
Show resolved
Hide resolved
@@ -703,8 +703,8 @@ class KafkaServer( | |||
case None => | |||
info(s"Broker registration for controller $controllerId is not available in the metadata cache") | |||
} | |||
case None => | |||
info("No controller present in the metadata cache") | |||
case _ => |
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 one confuses me. Isn't case None
clearer than case _
?
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.
The condition covers more than None. It includes Some(controller: KRaftCachedControllerId) as well.
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.
Let me add more explicit condition to prevent this confusion.
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.
LGTM when comments are addressed
This reverts commit b488c09.
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.
LGTM
…ing (#13001) Reviewers: Colin P. McCabe <cmccabe@apache.org>, Ismael Juma <ismael@juma.me.uk>, David Arthur <mumrah@gmail.com>
…ing (apache#13001) Reviewers: Colin P. McCabe <cmccabe@apache.org>, Ismael Juma <ismael@juma.me.uk>, David Arthur <mumrah@gmail.com>
…forwarding patch
Original patch: https://github.com/apache/kafka/pull/12961/files#