void generateLeaderAndIsrUpdates(String context,
                                     int brokerToRemove,
                                     int brokerToAdd,
                                     int brokerWithUncleanShutdown,
                                     List<ApiMessageAndVersion> records,
                                     Iterator<TopicIdPartition> iterator) {
        generateLeaderAndIsrUpdates(context, brokerToRemove, brokerToAdd, brokerWithUncleanShutdown, records, iterator, false);
    }
Iterate over a sequence of partitions and generate ISR/ELR changes and/or leader
changes if necessary.

@param context           A human-readable context string used in log4j logging.
@param brokerToRemove    NO_LEADER if no broker is being removed; the ID of the
                         broker to remove from the ISR and leadership, otherwise.
@param brokerToAdd       NO_LEADER if no broker is being added; the ID of the
                         broker which is now eligible to be a leader, otherwise.
@param brokerWithUncleanShutdown
                         NO_LEADER if no broker has unclean shutdown; the ID of the
                         broker which is now removed from the ISR, ELR and
                         leadership, otherwise.
@param records           A list of records which we will append to.
@param iterator          The iterator containing the partitions to examine.
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java