sureshanaparti commented on a change in pull request #4428:
URL: https://github.com/apache/cloudstack/pull/4428#discussion_r520390610



##########
File path: 
engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
##########
@@ -128,9 +132,24 @@ protected EndPoint findEndPointInScope(Scope scope, String 
sqlBase, Long poolId)
             }
         }
 
+        List<Long> dedicatedHosts = dedicatedResourceDao.listAllHosts();

Review comment:
       > This call doesn't get all hosts, it gets all dedicated hosts, which is 
then used to build up a random list of dedicated hosts to move to the back of 
the result set. To remove some of the entries I will have to iterate through 
another list of hosts from another resultset which I think would cause more 
overhead than doing it this way. Or am I misunderstanding your intention?
   
   @Spaceman1984 I mean to say, pick only the dedicated hosts based on the 
scope. For example, whenever the pool scope is Cluster, pick all the dedicated 
hosts in that cluster only, not the entire list of dedicated hosts. Got it?




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

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


Reply via email to