Eli Mesika has posted comments on this change.
Change subject: core: Prevent dead lock on vm device (#852451)
......................................................................
Patch Set 3: (4 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:
Done
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/dal/src/main/java/org/ovirt/engine/core/dao/MassOperationsGenericDaoDbFacade.java
Line 32: }
Line 33:
Line 34: @Override
Line 35: public void updateAll(String procedureName, Collection<T>
entities) {
Line 36: if (procedureName == null) {
Done
Line 37: procedureName = getProcedureNameForUpdate();
Line 38: }
Line 39: for (T entity : entities) {
Line 40: getCallsHandler().executeModification(procedureName,
....................................................
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());
Done
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:
Done
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 <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches