Michael Kublin has submitted this change and it was merged.

Change subject: engine: AsyncTaskManager - restart fix part 1 (Logic)
......................................................................


engine: AsyncTaskManager - restart fix part 1 (Logic)

The following fix should change a current behaviour which is:
During creation child command which is asynchronious a parameters of parent
command are saved in DB (this ok), but parameters of parent comand also 
contains a list
of parameters of child commands (sic!).
So a first child command created we save a parent command with list of one 
command,
second command created list with two commands and etc...
After a restart and random child is choosen, so we have a random number of 
child parameters.
By the way , if list of child parameters is updated after saving a task to db, 
we will never have a correct list
(Example can be seen in one of the next patches)
Solution, save to DB parent parameters and appropriate child command parameter, 
during endAction() bnuild a list
of parameters.
One of the known bugs (a lot of unknown): During preview on vm after all task 
are send to host, perform restart.
All task are send, all task finished successfully, but disk still left in 
status Locked and the number of disks is
random
Benefits:
1. Bug is solved
2. Reduced serialization and desirialization (by current situation we have 
O(n^2) serialization/deserialization operations)
3. Most of the logic moved to the same place, no need to copy paste it all over 
a project
4. No need to make work arounds all over a project

What is still not solved:
If we will fail in the middle of task creation, we will not know if all task 
that we have that all tak that we wanted to start,
the fix is easy and will be send soon

Change-Id: I06507f537b2de0dc358a59aa27e62cbb042ccbb1
Signed-off-by: Michael Kublin <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskFactory.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/EntityAsyncTask.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/AsyncTaskParameters.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/AsyncTasks.java
6 files changed, 40 insertions(+), 19 deletions(-)

Approvals:
  Michael Kublin: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06507f537b2de0dc358a59aa27e62cbb042ccbb1
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Kublin <[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