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



##########
File path: 
engine/storage/src/main/java/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
##########
@@ -391,12 +391,16 @@ public void copyAsync(DataObject srcdata, DataObject 
destData, AsyncCompletionCa
     private Answer sendToLeastBusyEndpoint(List<EndPoint> eps, CopyCommand 
cmd) {
         Answer answer = null;
         EndPoint endPoint = null;
-        Long epId = ssvmWithLeastMigrateJobs();
+        List<Long> epIds = ssvmWithLeastMigrateJobs();
+        Long epId = null;
+        if (!epIds.isEmpty()) {
+            epId = epIds.get(0);
+        }
         if (epId == null) {

Review comment:
       @Pearl1594 seems `epId` is no longer required for the check here. Can 
check with empty `epIds` ?  for end point, can use the first item from this 
list?




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