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

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@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@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Greg Padgett <gpadgett@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourfali@redhat.com> Gerrit-Reviewer: Ravi Nori <rnori@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
laravot@redhat.com