dajac commented on code in PR #13408:
URL: https://github.com/apache/kafka/pull/13408#discussion_r1148431780


##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -596,6 +596,11 @@ public void checkBrokerEpoch(int brokerId, long 
brokerEpoch) {
         }
     }
 
+    public long brokerEpoch(int brokerId) {
+        BrokerRegistration registration = brokerRegistrations.get(brokerId);
+        return registration == null ? -1 : registration.epoch();

Review Comment:
   Returning -1 when the broker is a bit risky in my opinion because we also 
use -1 in the request. It would be better to return null for instance.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to