private void addPartitionToReElectTimeouts(TopicPartition topicPartition) {
        if (featureControl.autoMQVersion().isReassignmentV1Supported()) {
            return;
        }
        Timeout timeout =  timer.newTimeout(t -> {
            partitionReElectTimeouts.remove(topicPartition);
            if (quorumController != null) {
                tryElectLeader(topicPartition);
            }
        }, PARTITION_RE_ELECT_LEADER_TIMEOUT_SECS, TimeUnit.SECONDS);
        partitionReElectTimeouts.put(topicPartition, timeout);
    }
Add partition to re-elect leader timeout.
Generally, this method is invoked to ensure that the partition leader can be re-elected even if the original broker is out of communication.
@param topicPartition the topic partition that needs to be re-elected
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java