[BUG] Use the multi-registry feature with Nacos registry that set namingLoadCacheAtStart=true, the cache of NacosNamingService will overwrite each other
envgap__apache__dubbo-7822
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
bc43d68a4cbbfae857895872d6f86df45140f0cd- Manifest
dubbo-dependencies-bom/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
apache/dubbo #7822 · read the original issue
- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. - [x] 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: build from mater branch * Operating System version: Mac OSX * Java version: 1.8 ### Steps to reproduce this issue When I use the [multi-registry](https://dubbo.apache.org/en/docs/v2.7/user/examples/multi-registry/) feature of Dubbo with setting `namingLoadCacheAtStart=true`(**default is also true in Dubbo**), the cache of NacosNamingService will overwrite each other. If two registries have different services, some of the services will be lost because of overwriting. For example, we have settings as below: ```xml <dubbo:registry id="registryDev" address="nacos://127.0.0.1:8849?namingLoadCacheAtStart=true"/> <dubbo:registry id="registryTest" address="nacos://127.0.0.1:8848?namingLoadCacheAtStart=true"/> ``` If registryStable overwrites registryDev, the consumer can't find the GreetingService in registryDev.  ### Expected Result The different registry has different cache folder, so the cache will not overwrite each other. PS: zookeeper works well with multi-registry feature of Dubbo. ### Actual Result The cache of NacosNamingService will overwrite each other. If two registries have different services, some of the services will be lost because of overwriting.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]