Ravi Nori has posted comments on this change.

Change subject: engine : Introduction of CommandManager
......................................................................


Patch Set 4: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandManager.java
Line 54:     CacheWrapper<NGuid, CommandEntity> commandMap;
Line 55: 
Line 56:     private CommandManager() {
Line 57:         executionContextMap = CacheProviderFactory.<NGuid, 
ExecutionContext>getCacheWrapper(EXECUTION_CONTEXT_MAP_NAME);
Line 58:         commandMap = CacheProviderFactory.<NGuid, 
CommandEntity>getCacheWrapper(COMMAND_MAP_NAME);
LFU and LRU is only for eviction from memory. We remove the entry from ehcache 
when we call endAction. If there is a cache miss we will just read it from disk.
Line 59:     }
Line 60: 
Line 61:     @Override
Line 62:     public VdcReturnValueBase endAction(


Line 161:             task.setAssociatedEntities(entityIds);
Line 162:             AsyncTaskUtils.addOrUpdateTaskInDB(task);
Line 163:             commandMap.put(
Line 164:                     task.getParameters().getDbAsyncTask().getStepId(),
Line 165:                     buildGetCommandEntity(
We are saving the command id and the parent command id in CommandEntity what 
else do we need to save?
Line 166:                     command.getCommandId(),
Line 167:                     command.getParameters().getParentParameters() == 
null ? Guid.Empty : 
command.getParameters().getParentParameters().getCommandId(),
Line 168:                     task));
Line 169:             getAsyncTaskManager().lockAndAddTaskToManager(task);


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/interfaces/CallBack.java
Line 5: import org.ovirt.engine.core.common.action.VdcReturnValueBase;
Line 6: import org.ovirt.engine.core.compat.NGuid;
Line 7: 
Line 8: public interface CallBack {
Line 9:     public VdcReturnValueBase endAction(NGuid stepId, VdcActionType 
actionType, VdcActionParametersBase actionParameters);
We will gradually move towards the solution you are proposing.


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/interfaces/TaskHelper.java
Line 14:  */
Line 15: public interface TaskHelper {
Line 16:     void endTaskStep(NGuid stepId, JobExecutionStatus exitStatus);
Line 17:     void endTaskJob(NGuid stepId, boolean exitStatus);
Line 18:     VDSReturnValue RunVdsCommand(VDSCommandType commandType, 
VDSParametersBase parameters);
Will fix it in the next patch
Line 19:     boolean taskHasContext(NGuid stepId);
Line 20:     public void acquireLockAsyncTask(AsyncTaskParameters 
actionParameters);


....................................................
File 
backend/manager/modules/taskmgr/src/main/java/org/ovirt/engine/core/taskmgr/EntityAsyncTask.java
Line 162:                     Ex2);
Line 163:         }
Line 164: 
Line 165:         finally {
Line 166:             handleEndActionResult(taskHelper, entityInfo, 
vdcReturnValue, dbAsyncTask);
Will do
Line 167:             _endActionsInProgress.decrementAndGet();
Line 168:         }
Line 169:     }
Line 170: 


--
To view, visit http://gerrit.ovirt.org/13152
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdd7585bfcfa6adeb761a8532218ba1aaa5e3c5d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to