- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: xxx
* Operating System version: xxx
* Java version: xxx

### Steps to reproduce this issue

1. xxx
2. xxx
3. xxx

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

What do you expected from the above steps？

### Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

```
Just put your stack trace here!
```

serviceNames = new LinkedHashSet<>();
            serviceNames.add(serviceName.toString());
            
            String legacySubscribedServiceName = getLegacySubscribedServiceName(url);
            if (!serviceName.toString().equals(legacySubscribedServiceName)) {
                
                serviceNames.add(legacySubscribedServiceName);
            }
        } else {
            serviceNames = filterServiceNames(serviceName);
        }
        return serviceNames;
    }
    private Set<String> filterServiceNames(NacosServiceName serviceName) {
        try{
            Set<String> serviceNames = new LinkedHashSet<>();
            serviceNames.addAll(namingService.getServicesOfServer(1, Integer.MAX_VALUE,
                getUrl().getGroup(Constants.DEFAULT_GROUP)).getData()
                .stream()
                .map(NacosServiceName::new)
                .filter(serviceName::isCompatible)
                .map(NacosServiceName::toString)
                .collect(Collectors.toList()));
            return serviceNames;
        }catch (Throwable cause){
            throw new RpcException("Failed to filter serviceName from nacos, url: " + getUrl() + ", serviceName: "+serviceName+", cause: " + cause.getMessage(), cause);
        }
    }
    /**
     * Get the legacy subscribed service name for compatible with Dubbo 2.7.3 and below