
Tal Nisan has submitted this change and it was merged. Change subject: core: persist before validate() only when there is a parent with cb ...................................................................... core: persist before validate() only when there is a parent with cb Currently we persist the command entity before the validate() check and on failure the command status is updated to ENDED_WITH_FAILURE. We do that so that When there is a parent command with a callback, it will be able to detect that the child command execution failed on that phase. Additionally, the parent is responsible to clear the command hirerchy. When there is no parent command, the command entity will never be cleared/monitored. In this patch the logic is changed so that the command is persisted before the CDA phase only in case there's a parent with a CB, otherwise it'll be persisted on the execution phase. Change-Id: Iae96cb414677c970c91ef860824d2a5ca981d861 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1352825 Signed-off-by: Liron Aravot <laravot@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandBaseTest.java 2 files changed, 22 insertions(+), 5 deletions(-) Approvals: Jenkins CI: Passed CI tests Moti Asayag: Looks good to me, approved Liron Aravot: Verified -- To view, visit https://gerrit.ovirt.org/60575 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae96cb414677c970c91ef860824d2a5ca981d861 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-4.0 Gerrit-Owner: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>