weizhouapache commented on code in PR #9096:
URL: https://github.com/apache/cloudstack/pull/9096#discussion_r1608314443


##########
server/src/main/java/com/cloud/network/NetworkServiceImpl.java:
##########
@@ -2267,7 +2267,7 @@ public Pair<List<? extends Network>, Integer> 
searchForNetworks(ListNetworksCmd
             isRecursive = true;
         }
 
-        Filter searchFilter = new Filter(NetworkVO.class, "id", false, null, 
null);
+        Filter searchFilter = new Filter(NetworkVO.class, "id", false, 
cmd.getStartIndex(), cmd.getPageSizeVal());

Review Comment:
   if networkfilter is Account, Domain or Shared, it should work
   
   However, if the networkfilter is All or AccountDomain, it might not work if 
the searchFilter is the same
   for example, there are 25 networks for account, 25 networks for domain. if 
page size is 20
   - on first page, it returns 20 networks for account, it is good
   - on second page, it should return the last 5 networks for account, and the 
first 15 networks for domain. But it will return the last 5 networks for 
account, and the last 5 networks for domain. right ?
   I think the `searchFilter` needs to be updated after the each search.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to