Ravi Nori has posted comments on this change.

Change subject: core: introduce RemoveSnapshotSingleDiskLive BLL command
......................................................................


Patch Set 10:

(6 comments)

http://gerrit.ovirt.org/#/c/26909/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DestroyImageCommandCallback.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DestroyImageCommandCallback.java:

Line 15:     private static final Log log = 
LogFactory.getLog(DestroyImageCommand.class);
Line 16: 
Line 17:     @Override
Line 18:     public void doPolling(Guid cmdId, List<Guid> childCmdIds) {
Line 19:         log.error("GP LOG DestroyImageCommandCallback.doPolling() 
start");
If you get rid of everything in this class, this class can be deleted

DestroyImageCommand does not have to override getCallBack to return an instance 
of DestroyImageCommandCallback. null for callback will work.
Line 20:         DestroyImageCommand cmd = getCommand(cmdId);
Line 21:         AsyncTasks task = 
TaskManagerUtil.getAsyncTaskFromDb(cmd.getParameters().getVdsmTaskIds().get(0));
Line 22:         if (task.getstatus() == AsyncTaskStatusEnum.finished) {
Line 23:             log.errorFormat("GP LOG 
DestroyImageCommandCallback.doPolling(), command status is {0}, async task 
result is {1}", cmd.getCommandStatus(), task.getresult());


http://gerrit.ovirt.org/#/c/26909/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeCommand.java:

Line 38:         if (vdsReturnValue.getSucceeded()) {
Line 39:             persistBlockJobPlaceholder(vdsReturnValue);
Line 40:             Guid jobId = (Guid) vdsReturnValue.getReturnValue();
Line 41:             getParameters().setVmJobId(jobId);
Line 42:             persistCommand(getParameters().getParentCommand(), true);
Is this the first place when the command is persisted
Line 43:         } else {
Line 44:             log.error("Failed to start Merge on VDS");
Line 45:             setCommandStatus(CommandStatus.FAILED);
Line 46:         }


Line 41:             getParameters().setVmJobId(jobId);
Line 42:             persistCommand(getParameters().getParentCommand(), true);
Line 43:         } else {
Line 44:             log.error("Failed to start Merge on VDS");
Line 45:             setCommandStatus(CommandStatus.FAILED);
If the above is the first place command is persisted, this update to command 
status will not update the status in db
Line 46:         }
Line 47:         log.error("GP LOG MergeCommand.executeCommand() finish");
Line 48:     }
Line 49: 


http://gerrit.ovirt.org/#/c/26909/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeCommandCallback.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeCommandCallback.java:

Line 13: import org.ovirt.engine.core.utils.log.LogFactory;
Line 14: 
Line 15: public class MergeCommandCallback extends CommandCallBack {
Line 16:     private static final Log log = 
LogFactory.getLog(MergeCommandCallback.class);
Line 17: 
looks good
Line 18:     @Override
Line 19:     public void doPolling(Guid cmdId, List<Guid> childCmdIds) {
Line 20:         log.error("GP LOG MergeCommandCallBack.doPolling() start");
Line 21:         // If the VM Job exists, the command is still active


http://gerrit.ovirt.org/#/c/26909/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeStatusCommandCallback.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeStatusCommandCallback.java:

Line 19: public class MergeStatusCommandCallback extends CommandCallBack {
Line 20:     private static final Log log = 
LogFactory.getLog(MergeStatusCommand.class);
Line 21: 
Line 22:     @Override
Line 23:     public void doPolling(Guid cmdId, List<Guid> childCmdIds) {
looks good
Line 24:         log.error("GP LOG MergeStatusCommandCallback.doPolling() 
start");
Line 25:         MergeStatusCommand<MergeParameters> command = 
getCommand(cmdId);
Line 26:         Set<Guid> images = command.getParameters().getVmVolumeChain();
Line 27: 


http://gerrit.ovirt.org/#/c/26909/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotSingleDiskLiveCommandCallback.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotSingleDiskLiveCommandCallback.java:

Line 13: 
Line 14:     private static final Log log = 
LogFactory.getLog(RemoveSnapshotSingleDiskLiveCommandCallback.class);
Line 15: 
Line 16:     @Override
Line 17:     public void doPolling(Guid cmdId, List<Guid> childCmdIds) {
if command handles multiple invocations of proceedCommandExecution this is fine
Line 18:         log.error("GP LOG 
RemoveSnapshotSinglediskLiveCommandCallback.doPolling() start");
Line 19:         getCommand(cmdId).proceedCommandExecution();
Line 20:         log.error("GP LOG 
RemoveSnapshotSinglediskLiveCommandCallback.doPolling() finish");
Line 21:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic47eb91a0ea1fe150e3b2152e2c9d5f1f2eb3678
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@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