apache / apache/dubbo

[Bug] removing the so-called registry config duplication leads to exception

Open
#16,381 3 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### Pre-check

- [x] I am sure that all the content I provide is in English.

### Search before asking

- [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.

### Apache Dubbo Component

Java SDK (apache/dubbo)

### Dubbo Version

Dubbo 3.3.6,openjdk 21

### Steps to reproduce this issue

if the dubbo consumer xml config is as follow

```


```

in which ZK1_ADDRESS and ZK2_ADDRESS are env variables.

what is exactly needed is that ZK1_ADDRESS and ZK2_ADDRESS may be the same or different.

when ZK1_ADDRESS and ZK2_ADDRESS are the same, current implementation will only register zk1 registy config successfully, the zk2 registry config is identified as duplication,then it throws exception `java.lang.IllegalStateException: Registry not found: zk2` when loading app2 reference config

### What you expected to happen

zk1 and zk2 are all registered successfully.

### Anything else

_No response_

### Do you have a (mini) reproduction demo?

- [ ] Yes, I have a minimal reproduction demo to help resolve this issue more effectively!

### Are you willing to submit a pull request to fix on your own?

- [x] Yes I am willing to submit a pull request on my own!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Research direction

Start with the consumer XML registry and reference-loading paths described in the report, then trace how registry configurations are deduplicated when their resolved addresses match. Reproduce the zk1/zk2 case with identical and different environment-variable values; done when both named registries remain available and app2 loads without the Registry not found exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.