Allon Mureinik has posted comments on this change.

Change subject: core: Add alias and description for disk meta data
......................................................................


Patch Set 13:

(3 comments)

http://gerrit.ovirt.org/#/c/34163/13/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java:

Line 354: 
Line 355:     private void performDiskUpdate(final boolean unlockImage) {
Line 356:         if (isMetaDataPropertiesChangedForDiskImage()) {
Line 357:             updateMetaDataDescription((DiskImage) getNewDisk());
Line 358:         }
> We should not add a lock in the DB since this is a synchronize operation
This sentence doesn't compile. Can you elaborate?
Line 359:         final Disk disk = 
getDiskDao().get(getParameters().getDiskId());
Line 360:         applyUserChanges(disk);
Line 361: 
Line 362:         TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Object>() {


Line 412:                             diskImage.getStorageIds().get(0),
Line 413:                             diskImage.getId(),
Line 414:                             diskImage.getImageId(),
Line 415:                             getJsonDiskDescription());
Line 416:             runVdsCommand(VDSCommandType.SetVolumeDescription, 
vdsCommandParameters);
> I disagree, first the user can still encounter a failure when calling the V
Both of these statements are true, and neither have anything to do with having 
a redundant VDSM operation that cannot succeed.
Line 417:         } catch (Exception e) {
Line 418:             StorageDomain storageDomain =
Line 419:                     
getStorageDomainDAO().getForStoragePool(diskImage.getStorageIds().get(0),
Line 420:                             getVm().getStoragePoolId());


Line 430:         try {
Line 431:             return 
ImagesHandler.getJsonDiskDescription(getParameters().getDiskInfo().getDiskAlias(),
Line 432:                     
getParameters().getDiskInfo().getDiskDescription());
Line 433:         } catch (IOException e) {
Line 434:             throw new RuntimeException("Exception while generating 
json for disk", e);
> I disagree, I think that this exception indicates that we failed on the jso
So in that case ImagesHandler should provide a better exception. catching and 
throwing a RuntimeException is just wrong.
Line 435:         }
Line 436:     }
Line 437: 
Line 438:     protected void updateDiskProfile() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2642ae7016579ead699509426e01ac2010bd374
Gerrit-PatchSet: 13
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: Tal Nisan <tni...@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