DaanHoogland commented on a change in pull request #4395:
URL: https://github.com/apache/cloudstack/pull/4395#discussion_r505489877
##########
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:
@sureshanaparti is this a remark to style? if epIds is empty epId is
null so the check is needed in some way.
----------------------------------------------------------------
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]