apache / apache/dubbo

[Bug] The version is upgraded, causing the broadcast mode to be unavailable

Open
#14,280 3 comments 0 reactions 0 assignees View on GitHub
component/need-triage type/need-triage
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 JAVA 2.7.6 JDK 1.8.211 windows10

### Steps to reproduce this issue

the problem is from version 2.7.6 to version 2.7.23 3.0.X, the code has not changed in any way, there are detailed screenshots in it

Here's the code
```
import com.caas.dubbo.service.CacheService;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ReferenceConfig;
import org.apache.dubbo.config.RegistryConfig;

/**
* @Description TODO
* @Author nuoqin
* @DATA 2024/6/4 9:47
*/
public class BroadCastTest {

public static void main(String[] args) {

//this is 2.7.23
ReferenceConfig reference = new ReferenceConfig<>();
reference.setApplication(new ApplicationConfig("canal-dubbo-consumer-1"));
RegistryConfig registryConfig = new RegistryConfig("zookeeper://192.168.250.46:2181");
registryConfig.setCluster("broadcast");
reference.setRegistry(registryConfig);

reference.setRetries(0);
reference.setInterface(CacheService.class);

CacheService service = reference.get();

System.out.println(service.updateCache());

}
}
```

### What you expected to happen

When I upgraded the system from dubbo 2.7.6 to 2.7.23, 3.0.X, I found that the 2.7.6 settings broadcast can be placed in "registryConfig.setCluster("broadcast"); But after the upgrade, it was found that the service was called again, and only one service got a response.
before 2.7.6
![f22152c614f0b0a3f910a76fc8dac6d](https://github.com/apache/dubbo/assets/45343280/aa3830da-691a-4e73-91ae-b921c7f22dfe)
after 2.7.23
![2539a909f4ec19ca5e92d4bd12c6235](https://github.com/apache/dubbo/assets/45343280/69364eea-2ba7-418f-b6d7-39f08fa84629)

The picture above is a piece of test code that I wrote based on our business,

### Anything else

_No response_

### 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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.