Martin Peřina has posted comments on this change.

Change subject: core: fixing other_dc proxy preference implementation
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/31870/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java:

Line 386:                                     && 
vds.getStoragePoolId().equals(_vds.getStoragePoolId());
Line 387:                         }
Line 388:                     }
Line 389:                 }
Line 390:                 else if (proxyOptions == PMProxyOptions.OTHER_DC) {
The new condition is a part of all subconditions. Wouldn't it be more readable 
to change it to:

 else if (proxyOptions == PMProxyOptions.OTHER_DC) {
     if (vds.getStoragePoolId().equals(_vds.getStoragePoolId())) {
         // host is from the same DC
         return false;
     }
     if (onlyUpHost) {
         if (filterSelf) {
             return !vds.getId().equals(_vds.getId())
                     && vds.getStatus() == VDSStatus.Up;
         } else {
             return vds.getStatus() == VDSStatus.Up;
         }
     } else {
         if (filterSelf) {
             return !isHostNetworkUnreacable(vds)
                     && !vds.getId().equals(_vds.getId());
         } else {
             return !isHostNetworkUnreacable(vds);
         }
     }
 }
Line 391:                     if (onlyUpHost) {
Line 392:                         if (filterSelf) {
Line 393:                             return !vds.getId().equals(_vds.getId())
Line 394:                                     && 
!vds.getStoragePoolId().equals(_vds.getStoragePoolId())


http://gerrit.ovirt.org/#/c/31870/1/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java:

Line 99:     public void setProxyPreferences(String proxyPreferences) {
Line 100:         this.proxyPreferences = proxyPreferences;
Line 101:     }
Line 102: 
Line 103:     private String proxyPreferences;
It would more accurate to call this pmProxyPreferences same as in VDS


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0de81858dc9f9b76bd27c75cb47086c884f1d6cd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@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