You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
got error message : 'fromIndex > toIndex' after calling '/service/list'
Expected behavior
got empty data list if there is no data that meets the conditions
Acutally behavior
got error
How to Reproduce
Steps to reproduce the behavior:
1.I have 3 services on nacos.
2.I want to get all service list using 'getServicesOfServer(int pageNo, int pageSize)' api of nacos client.
3.first, I call this method using params: pageNo = 1, pageSize = 10, this works fine.
4.then, I call this method using params: pageNo = 2, pageSize = 10, I got the error above.
Describe the bug
got error message : 'fromIndex > toIndex' after calling '/service/list'
Expected behavior
got empty data list if there is no data that meets the conditions
Acutally behavior
got error
How to Reproduce
Steps to reproduce the behavior:
1.I have 3 services on nacos.
2.I want to get all service list using 'getServicesOfServer(int pageNo, int pageSize)' api of nacos client.
3.first, I call this method using params: pageNo = 1, pageSize = 10, this works fine.
4.then, I call this method using params: pageNo = 2, pageSize = 10, I got the error above.
I have seen the source code of https://github.com/alibaba/nacos/blob/1.4.0/naming/src/main/java/com/alibaba/nacos/naming/controllers/ServiceController.java, and I think the reason of the error is line 263.
In this case, start = 10 and end = 3 when pageNo = 2, pageSize = 10.
then 'serviceNameList.subList(start, end)' throws an error.
Additional context
my client fake client code is:
The text was updated successfully, but these errors were encountered: