junrao commented on code in PR #13408: URL: https://github.com/apache/kafka/pull/13408#discussion_r1148021906
########## metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java: ########## @@ -596,6 +596,11 @@ public void checkBrokerEpoch(int brokerId, long brokerEpoch) { } } + public long getBrokerEpoch(int brokerId) { Review Comment: We typically don't use getters. So this can just be `brokerEpoch`. ########## metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java: ########## @@ -2296,4 +2379,17 @@ public void testProcessBrokerHeartbeatInControlledShutdown(MetadataVersion metad assertEquals(expectedRecords, result.records()); } + + private static BrokerState getBrokerState(int brokerId, Long brokerEpoch) { Review Comment: We typically don't use getters. So this can just be `brokerState`. ########## metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java: ########## @@ -449,7 +450,8 @@ public void testBalancePartitionLeaders() throws Throwable { .setBrokerEpoch(brokerEpochs.get(partitionRegistration.leader)); alterPartitionRequest.topics().add(topicData); - active.alterPartition(ANONYMOUS_CONTEXT, alterPartitionRequest).get(); + short version = ANONYMOUS_CONTEXT.requestHeader().requestApiVersion(); Review Comment: Hmm, is this right? ANONYMOUS_CONTEXT's requestApiVersion seems to be always 0? -- 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