private static ConfigInfos mergeConfigInfos(String connType, ConfigInfos... configInfosList) {
        int errorCount = 0;
        List<ConfigInfo> configInfoList = new LinkedList<>();
        Set<String> groups = new LinkedHashSet<>();
        for (ConfigInfos configInfos : configInfosList) {
            if (configInfos != null) {
                errorCount += configInfos.errorCount();
                configInfoList.addAll(configInfos.values());
                groups.addAll(configInfos.groups());
            }
        }
        return new ConfigInfos(connType, errorCount, new ArrayList<>(groups), configInfoList);
    }
Build the {@link RestartPlan} that describes what should and should not be restarted given the restart request
and the current status of the connector and task instances.

@param request the restart request; may not be null
@return the restart plan, or empty if this worker has no status for the connector named in the request and therefore the
        connector cannot be restarted
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java