Arik Hadas has posted comments on this change. Change subject: core: CommandBase - end job after execution only if there is no callback ......................................................................
Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/41693/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 1389: // the VM/VmTemplate status to 'Down'/'OK' too soon. Line 1390: startPollingAsyncTasks(); Line 1391: } Line 1392: } finally { Line 1393: if (getCallBack() == null && !hasTasks() && !ExecutionHandler.checkIfJobHasTasks(getExecutionContext())) { it is not a coincidence that this check appears right next to !hasTasks - it is really similar, in both cases the execute phase ends and the command is still alive. So you don't want to end the execution job just like you won't want to release engine-lock if the lock is set for the entire command's execution. I think that conceptually this change is ok, but I suggest to have a method (maybe isAsync?) that does both of these checks and it should be used inside this class Line 1394: ExecutionHandler.endJob(getExecutionContext(), getSucceeded()); Line 1395: } Line 1396: } Line 1397: } -- To view, visit https://gerrit.ovirt.org/41693 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a5df0fc98add315ffd67f4888f7614285dcbbb9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches