You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/12/19 11:58:08 UTC

[GitHub] [cloudstack] nvazquez commented on a diff in pull request #6840: infra: edge zones

nvazquez commented on code in PR #6840:
URL: https://github.com/apache/cloudstack/pull/6840#discussion_r1052123246


##########
services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java:
##########
@@ -1307,15 +1308,12 @@ public void onScanStart() {
 
     @Override
     public Long[] getScannablePools() {
-        List<DataCenterVO> zones = _dcDao.listEnabledZones();
-
-        Long[] dcIdList = new Long[zones.size()];
-        int i = 0;
-        for (DataCenterVO dc : zones) {
-            dcIdList[i++] = dc.getId();
+        List<DataCenterVO> zones = _dcDao.listEnabledNonEdgeZones();
+        List<Long> zoneIds = zones.stream().map(DataCenterVO::getId).collect(Collectors.toList());

Review Comment:
   Can we add a null check for zones before this?



-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org