Maor Lipchuk has posted comments on this change.

Change subject: core: Use the latest OVF_STORE files
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.ovirt.org/#/c/32747/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AttachStorageDomainToPoolCommand.java:

Line 203:         List<DiskImage> ovfStoreDiskImages = 
getAllOVFDisks(unregisteredDisks);
Line 204:         if (!ovfStoreDiskImages.isEmpty()) {
Line 205:             registerAllOvfDisks(ovfStoreDiskImages);
Line 206:             boolean entitiesRetrieved = false;
Line 207:             while (!ovfStoreDiskImages.isEmpty()) {
> i'll elaborate more to clarify my point.
I guessed that what you meant, but handling and sorting the disks, will not be 
more efficient then what I did here
Line 208:                 Pair<DiskImage, Long> ovfDiskAndSize = 
getLatestOVFDisk(ovfStoreDiskImages);
Line 209:                 DiskImage ovfDisk = ovfDiskAndSize.getFirst();
Line 210:                 if (ovfDisk != null) {
Line 211:                     if (!entitiesRetrieved) {


Line 258:                         null,
Line 259:                         ovfDisk.getId(),
Line 260:                         StorageDomainOvfInfoStatus.OUTDATED,
Line 261:                         null);
Line 262:         
getDbFacade().getStorageDomainOvfInfoDao().save(storageDomainOvfInfo);
> you can't do that, we'll have that way vdsm calls within the transaction wh
I get what you mean, What I will do is that I will leave the method 
getEntitiesFromStorageOvfDisk as it is, and I will register all the OVF disks 
using the method getAllOVFDisks inside the transaction at line 159
Line 263:     }
Line 264: 
Line 265:     private void registerAllOvfDisks(List<DiskImage> 
ovfStoreDiskImages) {
Line 266:         for (DiskImage ovfStoreDiskImage : ovfStoreDiskImages) {


-- 
To view, visit http://gerrit.ovirt.org/32747
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8252281f295df49a28c3c131d9a98fef9af8f35e
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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

Reply via email to