Moti Asayag has posted comments on this change. Change subject: core:fixing step numbering for steps and sub-steps ......................................................................
Patch Set 3: Code-Review-1 (1 comment) http://gerrit.ovirt.org/#/c/33426/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java: Line 289: Line 290: try { Line 291: Job job = context.getJob(); Line 292: if (context.getExecutionMethod() == ExecutionMethod.AsJob && job != null) { Line 293: JobRepositoryFactory.getJobRepository().loadJobSteps(job); i'd suggest fetching the steps of job or a parent step only if the job doesn't have the steps. most of the time adding a step is in the same context as creating the job, so all the previously created steps are already part of the job. else, we'll face an excessive db access. In addition, if we check that if (job.getSteps().isEmpty()) { JobRepositoryFactory.getJobRepository().loadJobSteps(job); } It will be called for any first first step created for each Job, so monitored command invocation will demand an extra db access for the db. If it is considered as a big issue - we should have some "initialized" indicator on the Job, so we can rely on it for that new-job steps loading. (for simplicity, i'd start without it). Line 294: step = job.addStep(stepName, description); Line 295: try { Line 296: step.setExternal(isExternal); Line 297: JobRepositoryFactory.getJobRepository().saveStep(step); -- To view, visit http://gerrit.ovirt.org/33426 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic72e9ab64160116f4fbac3f3b2cdea63db7b9c75 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches