Arik Hadas has posted comments on this change.

Change subject: core: reduce compensation scope from hibernate command
......................................................................


Patch Set 5: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 1288:     protected Guid 
createTaskInCurrentTransaction(AsyncTaskCreationInfo asyncTaskCreationInfo,
Line 1289:             VdcActionType parentCommand,
Line 1290:             VdcObjectType entityType,
Line 1291:             Guid... entityIds) {
Line 1292:         return createTaskImpl(asyncTaskCreationInfo, parentCommand, 
null, entityType, entityIds);
because it was copy-paste of #createTask (line 1270) where there's no 
description, I can add description and the hibernate command will then need to 
provide a description which is currently doesn't provide, but I think it is an 
improvement that we shouldn't couple to this patch
Line 1293:     }
Line 1294: 
Line 1295:     /**
Line 1296:      * Use this method in order to create task in the 
AsyncTaskManager in a safe way. If you use this method within a


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
Line 137:             if (!ret1.getSucceeded()) {
Line 138:                 return;
Line 139:             }
Line 140: 
Line 141:             Guid guid1 = TransactionSupport.executeInNewTransaction(
I saw those patches (Ravi, nice work) and IIUC with that change we wouldn't 
need the compensation here at all - we can add the async task to the DB in the 
first transaction (line 99) with the changing the status to saving state, since 
if after that point the engine crashes, the infra will detect that there's a 
task with no vdsm task id and will fail the command and on failure we switch 
the status of the VM back to UP. I would prefer to merge this patch as is 
(before merging Ravi's patches, because there still is a chance that we would 
be required to backport them to 3.2.z and that way the backport will be 
easier), what do you think?
Line 142:                     new TransactionMethod<Guid>() {
Line 143:                         @Override
Line 144:                         public Guid runInTransaction() {
Line 145:                             
getCompensationContext().resetCompensation();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iec46798fc6ea01ef6b0b4701e1af5ba616edf910
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to