Yair Zaslavsky has posted comments on this change. Change subject: core: Prevent dead lock on vm device (#852451) ......................................................................
Patch Set 3: (3 inline comments) .................................................... File backend/manager/dbscripts/vm_device_sp.sql Line 72: _update_date = current_timestamp Line 73: WHERE device_id = v_device_id and vm_id = v_vm_id; Line 74: END; $procedure$ Line 75: LANGUAGE plpgsql; Line 76: See comment on VdsUpdateRuntimeInfo - indeed, it should be used there. Line 77: Create or replace FUNCTION UpdateVmDeviceRuntimeInfo( Line 78: v_device_id UUID, Line 79: v_vm_id UUID, Line 80: v_address varchar(255), .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java Line 156: saveVmDevicesToDb(); Line 157: } Line 158: Line 159: private void saveVmDevicesToDb() { Line 160: updateAllInTransaction(vmDeviceToSave.values(), getDbFacade().getVmDeviceDAO()); Correct, the order is not kept as map does not keep an order. Line 161: Line 162: if (!removedDeviceIds.isEmpty()) { Line 163: TransactionSupport.executeInScope(TransactionScopeOption.Required, Line 164: new TransactionMethod<Void>() { Line 211: * The entities to update. Line 212: * @param dao Line 213: * The DAO used for updating. Line 214: */ Line 215: Yes, and it joins your comment on your stored procedures (i.e - where the stored procedure is used - this is where it should be used). Line 216: private static <T extends BusinessEntity<?>> void updateAllInTransaction Line 217: (final String procedureName, final Collection<T> entities, final MassOperationsDao<T> dao) { Line 218: if (!entities.isEmpty()) { Line 219: TransactionSupport.executeInScope(TransactionScopeOption.Required, -- To view, visit http://gerrit.ovirt.org/7641 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If316259f9760777c5f85db0880a157021c61a6ba Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches