Allon Mureinik has posted comments on this change.

Change subject: engine: Split update of 'isPlugged' and 'bootOrder' 
properties...
......................................................................


Patch Set 8: Code-Review-1

(1 comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
Line 116:         device.setIsPlugged(!oldVmDevice.getIsPlugged());
Line 117:         TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Void>() {
Line 118:             @Override
Line 119:             public Void runInTransaction() {
Line 120:                 
getVmStaticDAO().incrementDbGeneration(getVm().getId());
This is the last thing that should be done.
You don't want to increment the generation before updating the boot order - 
it's a race.
Line 121:                 getVmDeviceDao().updateHotPlugDisk(device);
Line 122:                 return null;
Line 123:             }
Line 124:         });


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1359a34a48a6261e22631ff1640d81d735e8c490
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.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

Reply via email to