Sergey Gotliv has posted comments on this change. Change subject: [WIP]engine: Remove calls to getImageDomainsList API ......................................................................
Patch Set 3: (2 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java Line 231: for (DiskImage disk : disksList) { Line 232: GetImagesListVDSCommandParameters params = new GetImagesListVDSCommandParameters( Line 233: imageToDestinationDomainMap.get(disk.getId()), getStoragePoolId()); Line 234: Line 235: VDSReturnValue runVdsCommand = getBackend().getResourceManager().RunVdsCommand( Done Line 236: VDSCommandType.GetImagesList, params); Line 237: Line 238: if (runVdsCommand.getSucceeded()) { Line 239: List<Guid> imagesOnStorageDomain = (List<Guid>) runVdsCommand.getReturnValue(); Line 235: VDSReturnValue runVdsCommand = getBackend().getResourceManager().RunVdsCommand( Line 236: VDSCommandType.GetImagesList, params); Line 237: Line 238: if (runVdsCommand.getSucceeded()) { Line 239: List<Guid> imagesOnStorageDomain = (List<Guid>) runVdsCommand.getReturnValue(); I gave this patch thinking that this optimization is great but can be done later, but now I completely agree with Liron. Previous API "getImageDomainsList" couldn't be optimized, because the input was an image. Now when input is a Storage Domain it can and should be optimized. Line 240: if (imagesOnStorageDomain.contains(disk.getId())) { Line 241: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK); Line 242: return false; Line 243: } -- To view, visit http://gerrit.ovirt.org/15951 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I33069871db34e8b129c4d80098523654cd2a0629 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Eduardo <ewars...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches