Change in ovirt-engine[master]: core: obtain child commands in CommandBase.endAction()

laravot at redhat.com laravot at redhat.com
Thu Jan 14 09:33:54 UTC 2016


Liron Aravot has submitted this change and it was merged.

Change subject: core: obtain child commands in CommandBase.endAction()
......................................................................


core: obtain child commands in CommandBase.endAction()

In previous change it was asked to move the obtainChildCommands()
method to a base callbacks class (ChildCommandsCallbackBase) instead
of having the code in CommandBase.

This change is problematic, for example when having a command hierarchy
with a "height" of more than two commands on which each parent needs to
end its child commands the following will happen with the current code
(let's assume we have command A that executes command B that executes
 command C):
1. command C ends, its status is updated.
2. command B ends (as C ended), its status is updated.
3. command A ends, as it's the top command in the hierarchy its
endAction() is called after obtainChildCommands() was executed
within the callback.
4. command A executes command B endAction().
5. command B needs to execute command C endAction(), as
obtainChildCommands() wasn't executed for command B the child
parameters list isn't populated and command C endAction() won't be
called.

The problem is that obtainChildCommands() isn't executed prior to the
call to B.endAction(), this patch solves it by moving the method to
CommandBase.

Change-Id: I5b92bbe77414c8d2e662c88e6092cc6b90427f25
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChildCommandsCallbackBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
2 files changed, 18 insertions(+), 18 deletions(-)

Approvals:
  Ravi Nori: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Liron Aravot: Verified; Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/44000
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b92bbe77414c8d2e662c88e6092cc6b90427f25
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list