Yair Zaslavsky has posted comments on this change.

Change subject: core:Do not force fencing proxy to be ...(#876235)
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(1 inline comment)

Redundant DB call.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FencingExecutor.java
Line 52:                 }
Line 53:             });
Line 54:             // trying other Hosts that are not in UP since they can be 
a proxy for fencing operations
Line 55:             if (vdsToRun == null) {
Line 56:                 vdsToRun = 
LinqUtils.firstOrNull(DbFacade.getInstance().getVdsDao().getAll(), new 
Predicate<VDS>() {
Isn't this db call redundant? In addition, you can get all vds from  DB, and 
then sort them using a comparator in java (please remind me why cant we use a 
sorting function at DB? i.e - someting like "order by myfunc(field)"
Line 57:                     @Override
Line 58:                     public boolean eval(VDS vds) {
Line 59:                         return 
vds.getstorage_pool_id().equals(_vds.getstorage_pool_id());
Line 60:                     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I437e9b2bb0300f8d71cc8f0c50aaff1b253a63bb
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to