apache / apache/dubbo

The method "getConsumerAddressNum" in ServiceCheckUtils doesn't check all registries

Open
#8,025 0 comments 0 reactions 0 assignees View on GitHub
type/proposal
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

- [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: 2.7.12
* Operating System version: Mac OS 10.12.1
* Java version: 12.0.2

### Steps to reproduce this issue
https://github.com/apache/dubbo/blob/149d1f68e53e7809eb5e8bdde6a9d04dfbaca522/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/util/ServiceCheckUtils.java#L45-L47

As is said in the statement starting with "// TODO", when the system wants to get the number of consumer service addresses, the number obtained may be inaccurate in the case of multiple registries.
When using Qos(Quality of Service), a tool used to query and control services dynamically in Dubbo, the number will be 0 even if the consumer has some addresses.

![image](https://user-images.githubusercontent.com/18096538/121472208-b762e380-c975-11eb-9bf8-6e04aea7e2c4.png)

### Expected Result

The system should be able to handle the situation of multiple registries when getting the number of consumer service addresses.

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.