void handleBrokerUnfenced(int brokerId, long brokerEpoch, List<ApiMessageAndVersion> records) {
        if (featureControl.metadataVersion().isBrokerRegistrationChangeRecordSupported()) {
            records.add(new ApiMessageAndVersion(new BrokerRegistrationChangeRecord().
                setBrokerId(brokerId).setBrokerEpoch(brokerEpoch).
                setFenced(BrokerRegistrationFencingChange.UNFENCE.value()),
                (short) 0));
        } else {
            records.add(new ApiMessageAndVersion(new UnfenceBrokerRecord().setId(brokerId).
                setEpoch(brokerEpoch), (short) 0));
        }
        generateLeaderAndIsrUpdates("handleBrokerUnfenced", NO_LEADER, brokerId, NO_LEADER, records,
            brokersToIsrs.partitionsWithNoLeader());
    }
Generate the appropriate records to handle a broker becoming unfenced.

First, we create an UnfenceBrokerRecord. Then, we check if there are any
partitions that don't currently have a leader that should be led by the newly
unfenced broker.

@param brokerId      The broker id.
@param brokerEpoch   The broker epoch.
@param records       The record list to append to.
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java