Michael Kublin has posted comments on this change.
Change subject: [WIP] core: Extracting out AddOrUpdate out of SPMAsyncTask
......................................................................
Patch Set 3: (5 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
Line 451: public SPMAsyncTask CreateTask(AsyncTaskType taskType,
AsyncTaskParameters taskParameters) {
u can do return with out using a variable
Line 529: SPMAsyncTask task =
AsyncTaskFactory.Construct(creationInfo);
Here a bug, the task was not persisted to DB, or updated, these was done at
constructor of SPMAsyncTask, I think that now we can optimize a flow and reduce
number of calls to db
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 1054: if (task != null) {
Like I said should not be null
Line 1068:
why not m ove these also to util, we don't need these at CommandBase, the logic
is specific for AsyncTask and will be never overwritten
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/AsyncTaskUtils.java
Line 20: try {
Should be optimized, we can run one query , something like that, select IF NOT
exist
INSERT , else UPDATE, will be fast and better.
--
To view, visit http://gerrit.ovirt.org/5987
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If7d5913d145fb2952aa65a2b619f5d6d1019e74f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches