Ravi Nori has posted comments on this change.

Change subject: engine : Introduction of Poller, CommandEntity and interfaces 
for caching
......................................................................


Patch Set 5:

(3 comments)

@Oved

In latter patches CommandsCahce is modified to use command id as the key. Also 
clearing command cache comes in later patches.

Bu addressed your comments and removed stepId as key as it is misleading.

http://gerrit.ovirt.org/#/c/26335/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java:

Line 23:     }
Line 24: 
Line 25:     @Override
Line 26:     public void put(Guid stepId, Guid commandId, Guid parentCommandId, 
SPMAsyncTask task) {
Line 27:         commandMap.put(stepId, buildGetCommandEntity(commandId, 
parentCommandId, task));
> So the key here is the step id? and you do a get using the commandId?
This is rectified in latter patches, but will change here
Line 28:     }
Line 29: 
Line 30:     private CommandEntity buildGetCommandEntity(Guid commandId, Guid 
parentCommandId, SPMAsyncTask task) {
Line 31:         CommandEntity entity = new CommandEntity();


Line 26:     public void put(Guid stepId, Guid commandId, Guid parentCommandId, 
SPMAsyncTask task) {
Line 27:         commandMap.put(stepId, buildGetCommandEntity(commandId, 
parentCommandId, task));
Line 28:     }
Line 29: 
Line 30:     private CommandEntity buildGetCommandEntity(Guid commandId, Guid 
parentCommandId, SPMAsyncTask task) {
> shouldn't it be buildCommandEntity?
Done
Line 31:         CommandEntity entity = new CommandEntity();
Line 32:         entity.setId(commandId);
Line 33:         entity.setParentCommandId(parentCommandId);
Line 34:         CommandEntityUtils.setParameters(entity, 
task.getParameters().getDbAsyncTask().getActionParameters());


http://gerrit.ovirt.org/#/c/26335/5/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/CommandEntity.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/CommandEntity.java:

Line 63:     private Guid commandId;
Line 64:     private Guid parentCommandId;
Line 65:     private VdcActionType commandType;
Line 66:     private Map<String, Object> data;
Line 67:     private Date createdAt;
> I'd move the members to the beginning of the class.
Done
Line 68: 
Line 69:     public Set<Guid> getChildCommandIds() {
Line 70:         return childCommandIds;
Line 71:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2172333255131652bb78623352fb805d16fb4a1b
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@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

Reply via email to