@Override
    public <T extends CommonUpstream> List<T> updateStatusAndFilter(final List<T> existList, final List<? extends CommonUpstream> aliveList) {
        if (Objects.isNull(aliveList) || Objects.isNull(existList)) {
            return Lists.newArrayList();
        }
        long currentTimeMillis = System.currentTimeMillis();
        List<T> validExistList = existList.stream()
                .filter(e -> e.isStatus() || e.getTimestamp() > currentTimeMillis - TimeUnit.SECONDS.toMillis(UpstreamCheckService.getZombieRemovalTimes())
                        || aliveList.stream().anyMatch(alive -> alive.getUpstreamUrl().equals(e.getUpstreamUrl())))
                .collect(Collectors.toCollection(CopyOnWriteArrayList::new));
        validExistList.stream()
                .filter(upstream -> !upstream.isStatus() && aliveList.stream().anyMatch(alive -> alive.getUpstreamUrl().equals(upstream.getUpstreamUrl())))
                .forEach(upstream -> {
                    upstream.setStatus(true);
                    upstream.setTimestamp(currentTimeMillis);
                });
        validExistList.stream()
                .filter(upstream -> aliveList.stream().noneMatch(alive -> alive.getUpstreamUrl().equals(upstream.getUpstreamUrl())))
                .forEach(upstream -> {
                    upstream.setStatus(false);
                    upstream.setTimestamp(currentTimeMillis);
                });
        return validExistList;
    }
Update upstream status and remove invalid.

@param existList the existList
@param aliveList the aliveList
@return the valid existList
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/converter/AbstractSelectorHandleConverter.java