Oved Ourfali has posted comments on this change.

Change subject: engine : Command Executor should persist command before 
submitting to threadpool
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.ovirt.org/#/c/29219/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java:

Line 78:     }
Line 79: 
Line 80:     private void initCommandExecutor() {
Line 81:         if (!cmdExecutorInitialized) {
Line 82:             synchronized(LOCK) {
> you need to ack it first.. :)
indeed.
Line 83:                 if (!cmdExecutorInitialized) {
Line 84:                     for (CommandEntity cmdEntity : 
coco.getCommandsWithCallBackEnabled()) {
Line 85:                         switch(cmdEntity.getCommandStatus()) {
Line 86:                             case ACTIVE_SYNC:


Line 85:                         switch(cmdEntity.getCommandStatus()) {
Line 86:                             case ACTIVE_SYNC:
Line 87:                             case NOT_STARTED:
Line 88:                                 
coco.retrieveCommand(cmdEntity.getId()).setCommandStatus(CommandStatus.FAILED_RESTARTED);
Line 89:                                 break;
> so we won't do anything with such command until the cleanup job will clean 
for now I guess we don't.
Line 90:                             default:
Line 91:                                 if (!cmdEntity.isCallBackNotified()) {
Line 92:                                     addToCallBackMap(cmdEntity);
Line 93:                                 }


Line 118:             @Override
Line 119:             public VdcReturnValueBase call() throws Exception {
Line 120:                 return executeCommand(command);
Line 121:             }
Line 122:         });
> so what will happen if the submit was rejected?
I guess that it will rarely happen, but I see two options here:
1. Retry X times each every Y seconds.
2. Mark it as failed (also if failed on #1).

Other thoughts?
Line 123:     }
Line 124: 
Line 125:     private VdcReturnValueBase executeCommand(final CommandBase<?> 
command) {
Line 126:         CommandCallBack callBack = command.getCallBack();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d510836dc822a95198dc1db4a4f74206466f0c9
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@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