DaanHoogland commented on code in PR #7372:
URL: https://github.com/apache/cloudstack/pull/7372#discussion_r1149250975


##########
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java:
##########
@@ -1576,11 +1576,11 @@ protected Pair<Map<Volume, List<StoragePool>>, 
List<Volume>> findSuitablePoolsFo
 
         // for each volume find list of suitable storage pools by calling the
         // allocators
-        Set<Long> originalAvoidPoolSet = avoid.getPoolsToAvoid();
-        if (originalAvoidPoolSet == null) {
-            originalAvoidPoolSet = new HashSet<Long>();
+        Set<Long> originalAvoidPoolSet = new HashSet<>();
+        if (avoid.getPoolsToAvoid() != null) {
+            originalAvoidPoolSet.addAll(avoid.getPoolsToAvoid());
         }
-        Set<Long> poolsToAvoidOutput = new HashSet<Long>(originalAvoidPoolSet);
+        Set<Long> poolsToAvoidOutput = new HashSet<>(originalAvoidPoolSet);

Review Comment:
   @harikrishna-patnala , what is the logic here? As I see it it just adds to 
the avoid set to remember later and doesn´t clean the pools from trying the 
prior cluster from the avoid set trying this cluster. 
   
   If it works it works but It doesn't read like logical to me.



-- 
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