Allon Mureinik has posted comments on this change.

Change subject: core: Increment VM generation on disk update
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/36059/2/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 123:         } else {
Line 124:             try {
Line 125:                 performDiskUpdate(false);
Line 126:                 List<Pair<VM, VmDevice>> vmsForDisk = 
getVmDAO().getVmsWithPlugInfo(getParameters().getDiskId());
Line 127:                 for (Pair<VM, VmDevice> pair : vmsForDisk) {
You can just use getVmsDiskPluggedTo()
Line 128:                     
getVmStaticDAO().incrementDbGeneration(pair.getFirst().getId());
Line 129:                 }
Line 130:             } finally {
Line 131:                 freeLock();


Line 125:                 performDiskUpdate(false);
Line 126:                 List<Pair<VM, VmDevice>> vmsForDisk = 
getVmDAO().getVmsWithPlugInfo(getParameters().getDiskId());
Line 127:                 for (Pair<VM, VmDevice> pair : vmsForDisk) {
Line 128:                     
getVmStaticDAO().incrementDbGeneration(pair.getFirst().getId());
Line 129:                 }
Also, shouldn't this entire block be done in the endSuccefuly?
Line 130:             } finally {
Line 131:                 freeLock();
Line 132:             }
Line 133:         }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I51f22beccb4479e246a19d800d18a3283d37534c
Gerrit-PatchSet: 2
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: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to