Change in ovirt-engine[master]: core: AsyncTasks - use persisted context instead of generati...

Code Review gerrit at ovirt.org
Tue Nov 15 09:59:15 UTC 2016


>From Liron Aravot <laravot at redhat.com>:

Liron Aravot has submitted this change and it was merged.

Change subject: core: AsyncTasks - use persisted context instead of generating one
......................................................................


core: AsyncTasks - use persisted context instead of generating one

When all the async tasks of command ends, CommandAsyncTask executes
the command endAction(). It uses ExecutionHandler.createFinalizingContext()
to create the finalizing context for the command.

For 'traditional' async task manager flows, this behavior worked fine - that's
because the parent always executed the endAction() of the child commands by itself.
On COCO flows the endAction() of a child commands might be executed when it ends by
the ATM - that causes for the FINALIZING step to be added on that phase to the job
instead of on the parent end.

Currently we cache the command contexts, so there's no need to get the context
from createFinalizingContext(), we can use the exact context the command was executed
with and by that to avoid the problem.

Change-Id: I065551ee471a314ffd84b0f72a7b6079156e7f7a
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CoCoAsyncTaskHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandAsyncTask.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsRepository.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/AsyncCommandCallback.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandCRUDOperations.java
6 files changed, 20 insertions(+), 18 deletions(-)

Approvals:
  Martin Peřina: Looks good to me, but someone else must approve
  Ravi Nori: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Moti Asayag: Looks good to me, approved
  Liron Aravot: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I065551ee471a314ffd84b0f72a7b6079156e7f7a
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag 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