cmccabe commented on code in PR #12195: URL: https://github.com/apache/kafka/pull/12195#discussion_r880929826
########## metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java: ########## @@ -1087,9 +1111,15 @@ void handleBrokerFenced(int brokerId, List<ApiMessageAndVersion> records) { } generateLeaderAndIsrUpdates("handleBrokerFenced", brokerId, NO_LEADER, records, brokersToIsrs.partitionsWithBrokerInIsr(brokerId)); - records.add(new ApiMessageAndVersion(new FenceBrokerRecord(). - setId(brokerId).setEpoch(brokerRegistration.epoch()), - FENCE_BROKER_RECORD.highestSupportedVersion())); + if (featureControl.metadataVersion().brokerRegistrationChangeRecordSupported()) { + records.add(new ApiMessageAndVersion(new BrokerRegistrationChangeRecord(). + setBrokerId(brokerId).setBrokerEpoch(brokerRegistration.epoch()).setFenced((byte) 1), + (short) 0)); Review Comment: We want the fixed value, since any change in emitted version requires a change in MetadataVersion. -- 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