Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I use the multi-registry feature of Dubbo with setting namingLoadCacheAtStart=true, the cache of NacosNamingService will overwrite each other #5747

Closed
plusmancn opened this issue May 16, 2021 · 1 comment · Fixed by #5758
Labels
kind/enhancement Category issues or prs related to enhancement.
Milestone

Comments

@plusmancn
Copy link
Contributor

plusmancn commented May 16, 2021

Describe the bug
When I use the 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:

<dubbo:registry id="registryDev" address="nacos://127.0.0.1:8849?namingLoadCacheAtStart=false"/>
<dubbo:registry id="registryTest" address="nacos://127.0.0.1:8848?namingLoadCacheAtStart=false"/>

If registryStable overwrites registryDev, the consumer can't find the GreetingService in registryDev.
image

Expected behavior
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.

Acutally behavior
The cache of NacosNamingService will overwrite each other.
If two registries have different services, some of the services will be lost because of overwriting.

How to Reproduce
Steps to reproduce the behavior:

  1. Using Nacos as Dubbo register center
  2. Reference above.

Desktop (please complete the following information):

  • OS: Mac M1
  • Version: NacosClient1.x, NacosClient2.x
  • Module: nacos client, nacos api
  • SDK: com.alibaba.nacos:nacos-client(Java Version)

Additional context
nope

@plusmancn
Copy link
Contributor Author

plusmancn commented May 16, 2021

@i will solve it@

see #5749 for v1.x
see #5758 for v2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants