-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
contribution welcomegood first issueGood for newcomersGood for newcomerskind/bugCategory issues or prs related to bug.Category issues or prs related to bug.
Milestone
Description
Describe the bug
A clear and concise description of what the bug is.
The API /nacos/v1/ns/service/subscribers will return count 0 when the query number is more than subscriber count.
For example, service A has 5 subscribers, but when we query with pageNo=2&pageSize=1000, the result will be count=0, which is not expected.
The reason is the end will be smaller than start and so that subList throw exception.
int count = subscribers.size();
if (end > count) {
end = count;
}
Expected behavior
return right count number of subscribers.
Acutally behavior
return 0
How to Reproduce
Steps to reproduce the behavior:
- subscriber any service.
- call
/nacos/v1/ns/service/subscriberswithpageNo=2&pageSize=1000 - see the response count field
Desktop (please complete the following information):
- Version nacos-server 2.X
- Module naming
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
contribution welcomegood first issueGood for newcomersGood for newcomerskind/bugCategory issues or prs related to bug.Category issues or prs related to bug.