Yair Zaslavsky has posted comments on this change.
Change subject: engine : Fail tasks that dont have Vdsm Id
......................................................................
Patch Set 7: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
Line 182:
Line 183: public static void failTaskWithoutVdsmId(final AsyncTasks
task) {
Line 184: task.getTaskParameters().setTaskGroupSuccess(false);
Line 185: ExecutionHandler.endTaskStep(task.getStepId(),
JobExecutionStatus.FAILED);
Line 186: removeTaskFromDbByTaskId(task.getTaskId());
Good catch.
Ravi, I think the code of ExecutionHandler.endTaskStep + removeTaskFromDB
should be in the same transaction as endAction.
Bare in mind that endAction runs in the same transaction scope as the execution
phase - i.e, if we have @NonTransactiveAttribute then endAction will not run
in a transaction.
This means that the above 2 lines should be run in Required scope.
If you look at CommandBase.endAction the first line there performs
"startFinalizingStep" - I suggest to add there code to check if finalizing step
should be introduced, and and add the above 2 lines case it shouldn't.
However, if endAction is already run in REQUIRED - we must ensure that the
above two lines are run in the same transaction.
Line 187: if (task.getTaskType() == AsyncTaskType.unknown) {
Line 188: return;
Line 189: }
Line 190: ThreadPoolUtil.execute(new Runnable() {
--
To view, visit http://gerrit.ovirt.org/14368
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I110c483842027d1596f64dd8c3f635d62924a93f
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches