hachikuji commented on a change in pull request #8509: URL: https://github.com/apache/kafka/pull/8509#discussion_r413091037
########## File path: core/src/main/scala/kafka/server/KafkaApis.scala ########## @@ -3084,12 +3084,7 @@ class KafkaApis(val requestChannel: RequestChannel, // Broker epoch in LeaderAndIsr/UpdateMetadata/StopReplica request is unknown // if the controller hasn't been upgraded to use KIP-380 if (brokerEpochInRequest == AbstractControlRequest.UNKNOWN_BROKER_EPOCH) false - else { - val curBrokerEpoch = controller.brokerEpoch - if (brokerEpochInRequest < curBrokerEpoch) true - else if (brokerEpochInRequest == curBrokerEpoch) false - else throw new IllegalStateException(s"Epoch $brokerEpochInRequest larger than current broker epoch $curBrokerEpoch") - } + else brokerEpochInRequest < controller.brokerEpoch Review comment: Short comment here may be helpful about the case where the controller sees the epoch bump first. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org