Omer Frenkel has posted comments on this change.

Change subject: gluster: Fix add host gluster uuid already exists in the db.
......................................................................


Patch Set 5:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
Line 346:         glusterHostUuidFound = true;
Line 347:         if 
(GlusterFeatureSupported.glusterHostUuidSupported(getVdsGroup().getcompatibility_version()))
 {
Line 348:             VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.GetGlusterHostUUID,
Line 349:                     new 
VdsIdVDSCommandParametersBase(getVds().getId()));
Line 350:             Guid addedServerUuid = Guid.createGuidFromString((String) 
returnValue.getReturnValue());
although not mandatory, but why not parse the returnValue inside the 'if' after 
you check operation succeeded and its not null..
i dont see addedServerUuid used outside the 'if'
Line 351:             if (returnValue.getSucceeded() && 
returnValue.getReturnValue() != null) {
Line 352:                 if (!checkIfHostUuidExists(addedServerUuid)) {
Line 353:                     glusterHostUuidFound = true;
Line 354:                     
setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_ALREADY_EXISTS, null);


Line 349:                     new 
VdsIdVDSCommandParametersBase(getVds().getId()));
Line 350:             Guid addedServerUuid = Guid.createGuidFromString((String) 
returnValue.getReturnValue());
Line 351:             if (returnValue.getSucceeded() && 
returnValue.getReturnValue() != null) {
Line 352:                 if (!checkIfHostUuidExists(addedServerUuid)) {
Line 353:                     glusterHostUuidFound = true;
something here not so clear: 
if host uuid does not exist, you set glusterHostUuidFound = true ?(which is 
already true) sound like it was not found..
and why setting this if you exit the method right after?
Line 354:                     
setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_ALREADY_EXISTS, null);
Line 355:                     return false;
Line 356:                 }
Line 357:                 saveGlusterHostUuid(addedServerUuid);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1cca4c64cdbcb6a681089e1fbb2f0d707f768083
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Timothy Asir <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to