Sergey Gotliv has posted comments on this change.

Change subject: engine: Speed up SPM re-selection process.
......................................................................


Patch Set 6:

(3 comments)

....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SpmStopVDSCommand.java
Line 30:                             
.runVdsCommand(VDSCommandType.HSMGetAllTasksStatuses,
Line 31:                                     new 
VdsIdVDSCommandParametersBase(getVds().getId()));
Line 32: 
Line 33:                     if (isNotSPM(vdsReturnValue)) {
Line 34:                         getVDSReturnValue().setSucceeded(true);
I accept it and will remove it.
I have to say, that personally I prefer explicitly set success, because in this 
way you don't need to search in other classes what is default value for this 
variable.
Line 35:                         return;
Line 36:                     }  else {
Line 37:                         
getVDSReturnValue().setSucceeded(vdsReturnValue.getSucceeded());
Line 38:                         
getVDSReturnValue().setVdsError(vdsReturnValue.getVdsError());


Line 32: 
Line 33:                     if (isNotSPM(vdsReturnValue)) {
Line 34:                         getVDSReturnValue().setSucceeded(true);
Line 35:                         return;
Line 36:                     }  else {
Done
Line 37:                         
getVDSReturnValue().setSucceeded(vdsReturnValue.getSucceeded());
Line 38:                         
getVDSReturnValue().setVdsError(vdsReturnValue.getVdsError());
Line 39: 
Line 40:                         if (vdsReturnValue.getReturnValue() != null) {


Line 89:         return vdsStatus != VDSStatus.NonResponsive && 
getVds().getStatus() != VDSStatus.Connecting;
Line 90:     }
Line 91: 
Line 92:     private boolean isNotSPM(VDSReturnValue returnValue) {
Line 93:         return returnValue != null && returnValue.getVdsError() != 
null &&
Type of VdcBllErrors.SpmStatusError is enum VdcBllErrors.
Type of returnValue.getVdsError() is class VdsError

You can't compare them.
Line 94:                 returnValue.getVdsError().getCode() == 
VdcBllErrors.SpmStatusError;
Line 95:     }
Line 96: 
Line 97:     @Override


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2c191ad8d4ec0fb4f5f8ff68b84fa5189ecc7114
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
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